cvs: pear /MDB2 MDB2.php
| From: | Lorenzo Alberton | Date: | Sun, 04 Mar 2007 22:25:25 +0000 |
| Subject: | cvs: pear /MDB2 MDB2.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-44958@lists.php.net to get a copy of this message | ||
quipo Sun Mar 4 22:25:25 2007 UTC
Modified files:
/pear/MDB2 MDB2.php
Log:
when $code is null, MDB2::errorMessage($code) returns an array, but MDB2_Error() expects a string
http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2.php?r1=1.284&r2=1.285&diff_format=u
Index: pear/MDB2/MDB2.php
diff -u pear/MDB2/MDB2.php:1.284 pear/MDB2/MDB2.php:1.285
--- pear/MDB2/MDB2.php:1.284 Wed Feb 28 16:05:45 2007
+++ pear/MDB2/MDB2.php Sun Mar 4 22:25:24 2007
@@ -3,7 +3,7 @@
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
-// | Copyright (c) 1998-2006 Manuel Lemos, Tomas V.V.Cox, |
+// | Copyright (c) 1998-2007 Manuel Lemos, Tomas V.V.Cox, |
// | Stig. S. Bakken, Lukas Smith |
// | All rights reserved. |
// +----------------------------------------------------------------------+
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB2.php,v 1.284 2007/02/28 16:05:45 quipo Exp $
+// $Id: MDB2.php,v 1.285 2007/03/04 22:25:24 quipo Exp $
//
/**
@@ -964,6 +964,9 @@
function MDB2_Error($code = MDB2_ERROR, $mode = PEAR_ERROR_RETURN,
$level = E_USER_NOTICE, $debuginfo = null)
{
+ if (is_null($code)) {
+ $code = MDB2_ERROR;
+ }
$this->PEAR_Error('MDB2 Error: '.MDB2::errorMessage($code), $code,
$mode, $level, $debuginfo);
}