cvs: php4 /pear/DB mysql.php
| From: | Thomas V.V.Cox | Date: | Sun, 24 Jun 2001 19:51:19 +0000 |
| Subject: | cvs: php4 /pear/DB mysql.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-194@lists.php.net to get a copy of this message | ||
cox Sun Jun 24 21:51:19 2001 EDT
Modified files:
/php4/pear/DB mysql.php
Log:
don't dump mysql_error() errors on connect if PHP < 4.0.6
Index: php4/pear/DB/mysql.php
diff -u php4/pear/DB/mysql.php:1.58 php4/pear/DB/mysql.php:1.59
--- php4/pear/DB/mysql.php:1.58 Sat Jun 9 01:37:51 2001
+++ php4/pear/DB/mysql.php Sun Jun 24 21:51:19 2001
@@ -114,9 +114,9 @@
}
@ini_restore('track_errors');
if (empty($conn)) {
- if (mysql_error() != '') {
+ if (($err = @mysql_error()) != '') {
return $this->raiseError(DB_ERROR_CONNECT_FAILED, null, null,
- null, mysql_error());
+ null, $err);
} elseif (empty($php_errormsg)) {
return $this->raiseError(DB_ERROR_CONNECT_FAILED);
} else {