php5 depreciation fixes
authorTim Yardley <lst@openwrt.org>
Mon, 11 Jun 2007 20:55:36 +0000 (20:55 +0000)
committerTim Yardley <lst@openwrt.org>
Mon, 11 Jun 2007 20:55:36 +0000 (20:55 +0000)
SVN-Revision: 7574

lang/pear-db/patches/100-php5-deprecation-fixes.patch [new file with mode: 0644]

diff --git a/lang/pear-db/patches/100-php5-deprecation-fixes.patch b/lang/pear-db/patches/100-php5-deprecation-fixes.patch
new file mode 100644 (file)
index 0000000..714b678
--- /dev/null
@@ -0,0 +1,34 @@
+diff -ubrN DB-1.7.11-orig/DB/common.php DB-1.7.11/DB/common.php
+--- DB-1.7.11-orig/DB/common.php       2007-03-28 02:11:15.000000000 -0500
++++ DB-1.7.11/DB/common.php    2007-06-11 14:49:37.000000000 -0500
+@@ -1014,7 +1014,7 @@
+         if ($result === DB_OK || DB::isError($result)) {
+             return $result;
+         } else {
+-            $tmp =& new DB_result($this, $result);
++            $tmp = new DB_result($this, $result);
+             return $tmp;
+         }
+     }
+@@ -1217,7 +1217,7 @@
+             if ($result === DB_OK || DB::isError($result)) {
+                 return $result;
+             } else {
+-                $tmp =& new DB_result($this, $result);
++                $tmp = new DB_result($this, $result);
+                 return $tmp;
+             }
+         }
+diff -ubrN DB-1.7.11-orig/DB.php DB-1.7.11/DB.php
+--- DB-1.7.11-orig/DB.php      2007-03-28 02:11:15.000000000 -0500
++++ DB-1.7.11/DB.php   2007-06-11 14:49:42.000000000 -0500
+@@ -591,7 +591,8 @@
+      */
+     function isError($value)
+     {
+-        return is_a($value, 'DB_Error');
++        return $value instanceof DB_Error;
++        // return is_a($value, 'DB_Error');
+     }
+     // }}}