Loading core/lib/Drupal/Core/Utility/Error.php +4 −4 Original line number Diff line number Diff line Loading @@ -19,11 +19,11 @@ class Error { const ERROR = 3; /** * An array of blacklisted functions. * An array of ignored functions. * * @var array */ protected static $blacklistFunctions = ['debug', '_drupal_error_handler', '_drupal_exception_handler']; protected static $ignoredFunctions = ['debug', '_drupal_error_handler', '_drupal_exception_handler']; /** * Decodes an exception and retrieves the correct caller. Loading Loading @@ -110,9 +110,9 @@ public static function renderExceptionSafe($exception) { */ public static function getLastCaller(array &$backtrace) { // Errors that occur inside PHP internal functions do not generate // information about file and line. Ignore black listed functions. // information about file and line. Ignore the ignored functions. while (($backtrace && !isset($backtrace[0]['line'])) || (isset($backtrace[1]['function']) && in_array($backtrace[1]['function'], static::$blacklistFunctions))) { (isset($backtrace[1]['function']) && in_array($backtrace[1]['function'], static::$ignoredFunctions))) { array_shift($backtrace); } Loading core/tests/Drupal/Tests/Core/Utility/ErrorTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ public function providerTestGetLastCaller() { $two_items[] = $this->createBacktraceItem('test_function_two', 'TestClass'); $data[] = [$two_items, $this->createBacktraceItem('TestClass->test_function_two()')]; // Add blacklist functions to backtrace. They should get removed. // Add ignored functions to backtrace. They should get removed. foreach (['debug', '_drupal_error_handler', '_drupal_exception_handler'] as $function) { $two_items = $single_item; // Push to the start of the backtrace. Loading Loading
core/lib/Drupal/Core/Utility/Error.php +4 −4 Original line number Diff line number Diff line Loading @@ -19,11 +19,11 @@ class Error { const ERROR = 3; /** * An array of blacklisted functions. * An array of ignored functions. * * @var array */ protected static $blacklistFunctions = ['debug', '_drupal_error_handler', '_drupal_exception_handler']; protected static $ignoredFunctions = ['debug', '_drupal_error_handler', '_drupal_exception_handler']; /** * Decodes an exception and retrieves the correct caller. Loading Loading @@ -110,9 +110,9 @@ public static function renderExceptionSafe($exception) { */ public static function getLastCaller(array &$backtrace) { // Errors that occur inside PHP internal functions do not generate // information about file and line. Ignore black listed functions. // information about file and line. Ignore the ignored functions. while (($backtrace && !isset($backtrace[0]['line'])) || (isset($backtrace[1]['function']) && in_array($backtrace[1]['function'], static::$blacklistFunctions))) { (isset($backtrace[1]['function']) && in_array($backtrace[1]['function'], static::$ignoredFunctions))) { array_shift($backtrace); } Loading
core/tests/Drupal/Tests/Core/Utility/ErrorTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ public function providerTestGetLastCaller() { $two_items[] = $this->createBacktraceItem('test_function_two', 'TestClass'); $data[] = [$two_items, $this->createBacktraceItem('TestClass->test_function_two()')]; // Add blacklist functions to backtrace. They should get removed. // Add ignored functions to backtrace. They should get removed. foreach (['debug', '_drupal_error_handler', '_drupal_exception_handler'] as $function) { $two_items = $single_item; // Push to the start of the backtrace. Loading