diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-09-14 21:14:21 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-09-14 21:14:21 +0000 |
commit | 568034d90cb3c3832a47a61bd79cf0e708aa0d4d (patch) | |
tree | 41d80ab7814f252aa0949ae098487ec1c2c67bd2 /includes | |
parent | cf5b00c5dbe7070c1b1b89efee85e68cc62a3fb3 (diff) | |
download | brdo-568034d90cb3c3832a47a61bd79cf0e708aa0d4d.tar.gz brdo-568034d90cb3c3832a47a61bd79cf0e708aa0d4d.tar.bz2 |
#308399 by Damien Tournoud: Fix SimpleTest error handler to not spaz out and die when PHP errors are encountered.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc index 3a00beea4..33109f00e 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -637,6 +637,12 @@ function drupal_error_handler($errno, $message, $filename, $line, $context) { * An associative array with keys 'file', 'line' and 'function'. */ function _drupal_get_last_caller($backtrace) { + // Errors that occur inside PHP internal functions + // do not generate information about file and line. + while ($backtrace && !isset($backtrace[0]['line'])) { + array_shift($backtrace); + } + // The first trace is the call itself. // It gives us the line and the file of the last call. $call = $backtrace[0]; |