PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » MDB2 » Bug #4695

Bug with prepare and execute

Details

Submitted2005-06-28 13:07 UTC
Fromdanielr at electroteque dot org
Assignedlsmith
StatusClosed
PackageMDB2
PHP Version5.0.3
OSN/A
Roadmaps(Not assigned)

Comments

[2005-06-28 13:07 UTC] danielr at electroteque dot org

Description:
------------
When I upgraded MDB2 I experienced a bug that I only
just discovered. when i start a prepare statement
execute is requiring i add a types array its not
checking if $this->types is an array or not and breaking
on me

Reproduce code:
---------------
$this->prepare = $this->_db->prepare('query ...);

$this->prepare->bindArray($data);
$this->prepare->execute();

I have to do this

$this->prepare = $this->_db->prepare('query ...,array());

Actual result:
--------------
<font color="#ff0000"><tt><b>Warning</b>: key(): Passed
variable is not an array or object (/Volumes/DATA/www/
classes/PEAR/MDB2.php at line 3029)<br />
(/Volumes/DATA/www/classes/PEAR/MDB2.php at line
3029)<br />
(/Volumes/DATA/www/classes/PEAR/MDB2.php at line
3007)<br />

$types_numeric = is_numeric(key($this->types));

[2005-06-29 12:08 UTC] smith at backendmedia dot com

This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.

In case this was a pear.php.net website problem, the change will show
up on the website in short time.

Thank you for the report, and for helping us make PEAR better.