Commit 4e0ce97b authored by catch's avatar catch
Browse files

Issue #3478417 by longwave, cmlara: Error handler crashes with Undefined...

Issue #3478417 by longwave, cmlara: Error handler crashes with Undefined constant "DRUPAL_TEST_IN_CHILD_SITE"

(cherry picked from commit 5e1c30b5)
parent c2063e23
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ function _drupal_error_handler_real($error_level, $message, $filename, $line) {
  }
  // If the site is a test site then fail for user deprecations so they can be
  // caught by the deprecation error handler.
  elseif (DRUPAL_TEST_IN_CHILD_SITE && $error_level === E_USER_DEPRECATED) {
  elseif (defined('DRUPAL_TEST_IN_CHILD_SITE') && DRUPAL_TEST_IN_CHILD_SITE && $error_level === E_USER_DEPRECATED) {
    static $seen = [];
    if (array_search($message, $seen, TRUE) === FALSE) {
      // Only report each deprecation once. Too many headers can break some