diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-29 18:38:55 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-29 18:38:55 +0000 |
commit | 005a583f326fd48f501ec6569e00ebcdfb66b7ac (patch) | |
tree | d60cd0160daace079b6c612380a88b5abcd98c7c /includes/database.mysqli.inc | |
parent | 94c1729eacb262598aa75fda35049b344051012b (diff) | |
download | brdo-005a583f326fd48f501ec6569e00ebcdfb66b7ac.tar.gz brdo-005a583f326fd48f501ec6569e00ebcdfb66b7ac.tar.bz2 |
#168812 by webchick and pwolanin: in case we have a database error, trace it back to the original database function call, so we can provide a more accurate error message for DB errors
Diffstat (limited to 'includes/database.mysqli.inc')
-rw-r--r-- | includes/database.mysqli.inc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/includes/database.mysqli.inc b/includes/database.mysqli.inc index b51502a75..7ca01d15e 100644 --- a/includes/database.mysqli.inc +++ b/includes/database.mysqli.inc @@ -151,6 +151,8 @@ function _db_query($query, $debug = 0) { return $result; } else { + // Indicate to drupal_error_handler that this is a database error. + ${DB_ERROR} = TRUE; trigger_error(check_plain(mysqli_error($active_db) ."\nquery: ". $query), E_USER_WARNING); return FALSE; } |