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 #4191

var is misspelled and function is throwing warnings and notices

Details

Submitted2005-04-20 16:58 UTC
Fromnorny at yahoo dot com
Assignedlsmith
StatusClosed
PackageMDB2
PHP Version5.0.4
OSWinXP
Roadmaps(Not assigned)

Comments

[2005-04-20 16:58 UTC] norny at yahoo dot com

Description:
------------
$tpye is misspelled in MDB2.php on line 2921 in CVS. Then in the included patch, I added empty() and isset() to prevent a Warning on line 2922 and Notice on 2926.

Expected result:
----------------
--- MDB2_cvs.php 2005-04-19 08:53:33.000000000 -0400
+++ MDB2.php 2005-04-20 12:46:48.387125000 -0400
@@ -2918,12 +2918,12 @@
{
$parameters = array_keys($values);
foreach ($parameters as $parameter) {
- $tpye = null;
- if (array_key_exists($parameter, $types)) {
+ $type = null;
+ if (!empty($types) && array_key_exists($parameter, $types)) {
$type = $types[$parameter];
unset($types[$parameter]);
}
- $result = $this->bindParam($parameter, $values[$parameter], $type);
+ $result = $this->bindParam($parameter, $values[$parameter], isset($type) ? $type : null);
if (PEAR::isError($result)) {
return $result;
}

[2005-04-20 17:05 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.