#1847 trigger_error added if DB::connect return error object
This commit is contained in:
parent
f4c68079d4
commit
ba80426504
|
@ -6,7 +6,6 @@
|
|||
|
||||
/* ====================================================== specific PHP config */
|
||||
ini_set("mbstring.internal_encoding", 'UTF-8');
|
||||
//error_reporting(0);
|
||||
ini_set("html_errors", FALSE);
|
||||
ini_set("error_prepend_string", "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
||||
<methodResponse>
|
||||
|
@ -58,8 +57,10 @@ if(PHP5){
|
|||
}
|
||||
|
||||
/* ============================================================= runable code */
|
||||
#PEAR::setErrorHandling(PEAR_ERROR_RETURN);
|
||||
$dbc =& DB::connect($config['dsn'], TRUE);
|
||||
$r = $dbc =& DB::connect($config['dsn'], TRUE);
|
||||
if(PEAR::isError($r)){
|
||||
trigger_error("DB::connect: ".$r->getMessage()." ".$r->getUserInfo(),E_USER_ERROR);
|
||||
}
|
||||
$dbc->setErrorHandling(PEAR_ERROR_RETURN);
|
||||
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||
|
||||
|
|
Loading…
Reference in New Issue