public static function shutdown() { if (is_null($error = error_get_last()) === false) { self::handler($error['type'], $error['message'], $error['file'], $error['line']); } global $cfg; if (count(self::$errors) > 0) { /*if( !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { */ if (defined('KDB_JSON')) { Header('Content-type: application/json'); http_response_code(400); $return = ['status' => 400, 'result' => 'Internal', 'errors' => self::$errors]; echo json_encode($return, JSON_PRETTY_PRINT); } else { self::$html = Pug::c('Debug', ['errors' => self::$errors], true); if (self::$html == false) { hpr(self::$errors); } else { echo self::$html; } } } }
public function index() { hpr('404 page placeholder'); }