Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.0b5

Bug #16508 mdb2-2.5.0b1 not working with PHP 5.3.0
Submitted: 2009-08-10 15:45 UTC Modified: 2011-12-20 04:40 UTC
From: wkaiser Assigned: quipo
Status: Closed Package: MDB2 (version 2.5.0b2)
PHP Version: 5.3.0 OS: Solaris 10 SPARC
Roadmaps: 2.5.0b4    
Subscription  



Patch mdb2-no-assign-ref Revisions
Revision 2009-08-18 15:01 UTC
Developer rix0r
 
Download patch

This patch is obsolete

Obsoleted by patches:

diff -rupN PEAR_orig\MDB2\Driver\mysql.php PEAR\MDB2\Driver\mysql.php
--- PEAR_orig\MDB2\Driver\mysql.php	Tue Aug 18 15:16:19 2009
+++ PEAR\MDB2\Driver\mysql.php	Tue Aug 18 15:53:44 2009
@@ -921,7 +921,7 @@ class MDB2_Driver_mysql extends MDB2_Dri
         }
 
         $class_name = 'MDB2_Statement_'.$this->phptype;
-        $obj =& new $class_name($this, $statement_name, $positions, $query, $types, $result_types, $is_manip, $limit, $offset);
+        $obj = new $class_name($this, $statement_name, $positions, $query, $types, $result_types, $is_manip, $limit, $offset);
         $this->debug($query, __FUNCTION__, array('is_manip' => $is_manip, 'when' => 'post', 'result' => $obj));
         return $obj;
     }
@@ -1476,4 +1476,4 @@ class MDB2_Statement_mysql extends MDB2_
         return $result;
     }
 }
-?>
\ No newline at end of file
+?>
diff -rupN PEAR_orig\MDB2.php PEAR\MDB2.php
--- PEAR_orig\MDB2.php	Tue Aug 18 15:16:16 2009
+++ PEAR\MDB2.php	Tue Aug 18 15:53:22 2009
@@ -387,7 +387,7 @@ class MDB2
             return $err;
         }
 
-        $db =& new $class_name();
+        $db = new $class_name();
         $db->setDSN($dsninfo);
         $err = MDB2::setOptions($db, $options);
         if (PEAR::isError($err)) {
@@ -1882,7 +1882,7 @@ class MDB2_Driver_Common extends PEAR
                     "unable to load module '$module' into property '$property'", __FUNCTION__);
                 return $err;
             }
-            $this->{$property} =& new $class_name($this->db_index);
+            $this->{$property} = new $class_name($this->db_index);
             $this->modules[$module] =& $this->{$property};
             if ($version) {
                 // this will be used in the connect method to determine if the module
@@ -2569,7 +2569,7 @@ class MDB2_Driver_Common extends PEAR
                     'result class does not exist '.$class_name, __FUNCTION__);
                 return $err;
             }
-            $result =& new $class_name($this, $result, $limit, $offset);
+            $result = new $class_name($this, $result, $limit, $offset);
             if (!MDB2::isResultCommon($result)) {
                 $err =& $this->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
                     'result class is not extended from MDB2_Result_Common', __FUNCTION__);
@@ -2592,7 +2592,7 @@ class MDB2_Driver_Common extends PEAR
                     'result wrap class does not exist '.$result_wrap_class, __FUNCTION__);
                 return $err;
             }
-            $result =& new $result_wrap_class($result, $this->fetchmode);
+            $result = new $result_wrap_class($result, $this->fetchmode);
         }
         return $result;
     }
@@ -2937,7 +2937,7 @@ class MDB2_Driver_Common extends PEAR
         }
         $class_name = 'MDB2_Statement_'.$this->phptype;
         $statement = null;
-        $obj =& new $class_name($this, $statement, $positions, $query, $types, $result_types, $is_manip, $limit, $offset);
+        $obj = new $class_name($this, $statement, $positions, $query, $types, $result_types, $is_manip, $limit, $offset);
         $this->debug($query, __FUNCTION__, array('is_manip' => $is_manip, 'when' => 'post', 'result' => $obj));
         return $obj;
     }
@@ -4268,4 +4268,4 @@ function MDB2_defaultDebugOutput(&$db, $
 }
 
 // }}}
-?>
\ No newline at end of file
+?>