cvs: php4 /pear/DB mysql.php pgsql.php
| From: | Chuck Hagenbuch | Date: | Sat, 17 Feb 2001 16:45:01 +0000 |
| Subject: | cvs: php4 /pear/DB mysql.php pgsql.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-4070@lists.php.net to get a copy of this message | ||
chagenbu Sat Feb 17 08:45:01 2001 EDT
Modified files:
/php4/pear/DB mysql.php pgsql.php
Log:
consistently supress error messages from $connect_function
in mysql and pgsql.
Index: php4/pear/DB/mysql.php
diff -u php4/pear/DB/mysql.php:1.47 php4/pear/DB/mysql.php:1.48
--- php4/pear/DB/mysql.php:1.47 Fri Feb 16 09:57:06 2001
+++ php4/pear/DB/mysql.php Sat Feb 17 08:45:01 2001
@@ -110,11 +110,11 @@
$connect_function = $persistent ? "mysql_pconnect" : "mysql_connect";
if ($dbhost && $user && $pw) {
- $conn = $connect_function($dbhost, $user, $pw);
+ $conn = @$connect_function($dbhost, $user, $pw);
} elseif ($dbhost && $user) {
- $conn = $connect_function($dbhost, $user);
+ $conn = @$connect_function($dbhost, $user);
} elseif ($dbhost) {
- $conn = $connect_function($dbhost);
+ $conn = @$connect_function($dbhost);
} else {
$conn = false;
}
Index: php4/pear/DB/pgsql.php
diff -u php4/pear/DB/pgsql.php:1.27 php4/pear/DB/pgsql.php:1.28
--- php4/pear/DB/pgsql.php:1.27 Fri Feb 16 09:14:40 2001
+++ php4/pear/DB/pgsql.php Sat Feb 17 08:45:01 2001
@@ -109,9 +109,9 @@
$conn = @$connect_function(
"host=$dbhost port=$port dbname=$dbname user=$user password=$pw");
} elseif ($dbhost && $dbname && $options && $tty) {
- $conn = $connect_function($dbhost, $port, $options, $tty, $dbname);
+ $conn = @$connect_function($dbhost, $port, $options, $tty, $dbname);
} elseif ($dbhost && $dbname) {
- $conn = $connect_function($dbhost, $port, $dbname);
+ $conn = @$connect_function($dbhost, $port, $dbname);
} else {
$conn = false;
}