Quantcast
Viewing all articles
Browse latest Browse all 296229

Replace Drupal's error handling with Symfony/HttpKernel's

Problem

  • WSOD. No error. Nothing.

Cause

Symfony\Component\HttpKernel\Kernel.php:

    public function init()
    {
        if ($this->debug) {
            ini_set('display_errors', 1);
            error_reporting(-1);

            DebugClassLoader::enable();
            ErrorHandler::register($this->errorReportingLevel);
            if ('cli' !== php_sapi_name()) {
                ExceptionHandler::register();
            }
        } else {
            ini_set('display_errors', 0);
        }
    }

Details

  • index.php calls
    $kernel = new DrupalKernel('prod', FALSE);
    
  • The second argument is $debug, tacked onto $this->debug by the Kernel's constructor.
  • The rest is visible in the pasted snippet above.

Viewing all articles
Browse latest Browse all 296229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>