cvs: php4 /pear/DB mysql.php

From: Date: Tue, 29 Jan 2002 20:55:21 +0000
Subject: cvs: php4 /pear/DB mysql.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-2231@lists.php.net to get a copy of this message
chagenbu Tue Jan 29 15:55:21 2002 EDT Modified files: /php4/pear/DB mysql.php Log: Fix errors caused by not checking for variables before using them. Index: php4/pear/DB/mysql.php diff -u php4/pear/DB/mysql.php:1.84 php4/pear/DB/mysql.php:1.85 --- php4/pear/DB/mysql.php:1.84 Sun Jan 13 13:47:17 2002 +++ php4/pear/DB/mysql.php Tue Jan 29 15:55:20 2002 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.84 2002/01/13 18:47:17 cox Exp $ +// $Id: mysql.php,v 1.85 2002/01/29 20:55:20 chagenbu Exp $ // // Database independent query interface definition for PHP's MySQL // extension. @@ -104,11 +104,11 @@ return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND); $this->dsn = $dsninfo; - if ($dsninfo['protocol'] == 'unix') { + if (isset($dsninfo['protocol']) && $dsninfo['protocol'] == 'unix') { $dbhost = ':' . $dsninfo['socket']; } else { $dbhost = $dsninfo['hostspec'] ? $dsninfo['hostspec'] : 'localhost'; - if ($dsninfo['port']) { + if (!empty($dsninfo['port'])) { $dbhost .= ':' . $dsninfo['port']; } } @@ -778,4 +778,4 @@ // binmode } -?> \ No newline at end of file +?>

« previous php.pear.cvs (#2231) next »