From: Stig Bakken Date: Mon, 24 Jul 2000 08:24:14 +0000 (+0000) Subject: @Ported DB to new error reporting scheme X-Git-Tag: PRE_FILE_COMPILE_API_CHANGE~170 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e0924de112aaeca0ba59fc0f2f785c47fa9dcb80;p=php @Ported DB to new error reporting scheme --- diff --git a/pear/DB.php b/pear/DB.php index d9f7e51f37..5a70356fd1 100644 --- a/pear/DB.php +++ b/pear/DB.php @@ -269,7 +269,7 @@ class DB { DB_ERROR_UNSUPPORTED => "not supported", DB_ERROR_MISMATCH => "mismatch", DB_ERROR_INVALID => "invalid", - DB_ERROR_NOT_CAPABLE => "DB implementation not capable", + DB_ERROR_NOT_CAPABLE => "DB backend not capable", DB_ERROR_INVALID_NUMBER => "invalid number", DB_ERROR_INVALID_DATE => "invalid date or time", DB_ERROR_DIVZERO => "division by zero", @@ -282,6 +282,9 @@ class DB { DB_WARNING_READ_ONLY => "warning: read only" ); } + if (DB::isError($value)) { + $value = $value->code; + } return $errorMessages[$value]; }