php5 depreciation fixes
[openwrt/svn-archive/archive.git] / lang / pear-db / patches / 100-php5-deprecation-fixes.patch
1 diff -ubrN DB-1.7.11-orig/DB/common.php DB-1.7.11/DB/common.php
2 --- DB-1.7.11-orig/DB/common.php 2007-03-28 02:11:15.000000000 -0500
3 +++ DB-1.7.11/DB/common.php 2007-06-11 14:49:37.000000000 -0500
4 @@ -1014,7 +1014,7 @@
5 if ($result === DB_OK || DB::isError($result)) {
6 return $result;
7 } else {
8 - $tmp =& new DB_result($this, $result);
9 + $tmp = new DB_result($this, $result);
10 return $tmp;
11 }
12 }
13 @@ -1217,7 +1217,7 @@
14 if ($result === DB_OK || DB::isError($result)) {
15 return $result;
16 } else {
17 - $tmp =& new DB_result($this, $result);
18 + $tmp = new DB_result($this, $result);
19 return $tmp;
20 }
21 }
22 diff -ubrN DB-1.7.11-orig/DB.php DB-1.7.11/DB.php
23 --- DB-1.7.11-orig/DB.php 2007-03-28 02:11:15.000000000 -0500
24 +++ DB-1.7.11/DB.php 2007-06-11 14:49:42.000000000 -0500
25 @@ -591,7 +591,8 @@
26 */
27 function isError($value)
28 {
29 - return is_a($value, 'DB_Error');
30 + return $value instanceof DB_Error;
31 + // return is_a($value, 'DB_Error');
32 }
33
34 // }}}