Update of /cvsroot/phplib/php-lib-stable/php
In directory usw-pr-cvs1:/tmp/cvs-serv29593
Modified Files:
db_mysql.inc
Log Message:
Fix error reporting problems.
Bug IDs: #445393, #450358, #450359.
Index: db_mysql.inc
===================================================================
RCS file: /cvsroot/phplib/php-lib-stable/php/db_mysql.inc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** db_mysql.inc 2001/08/13 22:54:33 1.5
--- db_mysql.inc 2001/08/13 23:12:01 1.6
***************
*** 78,82 ****
if (!@mysql_select_db($Database,$this->Link_ID)) {
! $this->halt("cannot use database ".$this->Database);
return 0;
}
--- 78,82 ----
if (!@mysql_select_db($Database,$this->Link_ID)) {
! $this->halt("cannot use database ".$Database);
return 0;
}
***************
*** 184,188 ****
$res = @mysql_query($query, $this->Link_ID);
if (!$res) {
! $this->halt("lock($table, $mode) failed.");
return 0;
}
--- 184,188 ----
$res = @mysql_query($query, $this->Link_ID);
if (!$res) {
! $this->halt("lock() failed.");
return 0;
}
***************
*** 310,319 ****
$this->connect();
$id = @mysql_list_fields($this->Database, $table);
! if (!$id)
$this->halt("Metadata query failed.");
} else {
$id = $this->Query_ID;
! if (!$id)
$this->halt("No query specified.");
}
--- 310,323 ----
$this->connect();
$id = @mysql_list_fields($this->Database, $table);
! if (!$id) {
$this->halt("Metadata query failed.");
+ return false;
+ }
} else {
$id = $this->Query_ID;
! if (!$id) {
$this->halt("No query specified.");
+ return false;
+ }
}
|