cvs: pear(MDB_1) /MDB MDB.php
| From: | Lukas Smith | Date: | Wed, 21 Jan 2004 12:01:36 +0000 |
| Subject: | cvs: pear(MDB_1) /MDB MDB.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-15839@lists.php.net to get a copy of this message | ||
lsmith Wed Jan 21 07:01:36 2004 EDT
Modified files: (Branch: MDB_1)
/pear/MDB MDB.php
Log:
- php5 fix for MDB::isError() - improved (tm)
http://cvs.php.net/diff.php/pear/MDB/MDB.php?r1=1.59.4.5&r2=1.59.4.6&ty=u
Index: pear/MDB/MDB.php
diff -u pear/MDB/MDB.php:1.59.4.5 pear/MDB/MDB.php:1.59.4.6
--- pear/MDB/MDB.php:1.59.4.5 Wed Jan 21 06:26:48 2004
+++ pear/MDB/MDB.php Wed Jan 21 07:01:36 2004
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@backendmedia.com> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB.php,v 1.59.4.5 2004/01/21 11:26:48 lsmith Exp $
+// $Id: MDB.php,v 1.59.4.6 2004/01/21 12:01:36 lsmith Exp $
//
require_once('PEAR.php');
@@ -180,7 +180,7 @@
* MDB_Manager This class handles the xml schema management.
*
* @package MDB
- * @version $Id: MDB.php,v 1.59.4.5 2004/01/21 11:26:48 lsmith Exp $
+ * @version $Id: MDB.php,v 1.59.4.6 2004/01/21 12:01:36 lsmith Exp $
* @category Database
* @author Lukas Smith <smith@backendmedia.com>
*/
@@ -439,9 +439,8 @@
*/
function isError($value)
{
- return(is_object($value)
- && (strtolower(get_class($value)) == 'mdb_error'
- || strtolower(is_subclass_of($value, 'mdb_error')))
+ return (is_object($value)
+ && (is_a($value, 'mdb_error') || is_a($value, 'MDB_Error'))
);
}