/** * Wrapper that converts PHP errors to exceptions and passes them * to the standard error50x handler. */ public function phpErrorHandler($errno, $errstr, $errfile, $errline) { $ignore = array(E_DEPRECATED, E_STRICT, E_NOTICE); if (in_array($errno, $ignore)) { return; } $request = $this->request; if (!$request) { // Ouch that's bad. $request = new Request('', array(), array(), new Security(), array(), array()); } $request->setException(new \ErrorException($errstr, $errno, $errno, $errfile, $errline)); $result = $this->process($this->error50x, $request); return $this->display($result['request'], $result['response']); }