tidying up

This commit is contained in:
2019-09-23 14:12:52 +02:00
parent 0a9430490c
commit d07692af94
4 changed files with 3 additions and 38 deletions

View File

@@ -3,45 +3,11 @@ error_reporting(E_ALL);
ini_set('log_errors','1');
ini_set('display_errors','0');
define('ROOT_DIR', __DIR__);
register_shutdown_function(function() {
$error = error_get_last();
switch($error['type']){
case E_ERROR:
http_response_code(500);
header('HTTP/1.1 500 Internal Server Error');
break;
case E_PARSE:
http_response_code(500);
header('HTTP/1.1 500 Internal Server Error');
break;
case E_CORE_ERROR:
http_response_code(500);
header('HTTP/1.1 500 Internal Server Error');
break;
case E_COMPILE_ERROR:
http_response_code(500);
header('HTTP/1.1 500 Internal Server Error');
break;
case E_USER_ERROR:
http_response_code(500);
header('HTTP/1.1 500 Internal Server Error');
break;
case E_RECOVERABLE_ERROR:
http_response_code(500);
header('HTTP/1.1 500 Internal Server Error');
break;
}
/* if ($error['type'] == E_ERROR || $error['type'] == E_PARSE || $error['type'] == E_CORE_ERROR || $error['type'] == E_COMPILE_ERROR || $error['type'] == E_RECOVERABLE_ERROR) {
header('HTTP/1.1 500 Internal Server Error');
http_response_code(500);
} */
});
session_start();
require_once(ROOT_DIR.'/model/testactions/TestAction.php');
//date_default_timezone_set('Europe/Amsterdam');
require_once(ROOT_DIR.'/controller/MVCController.php');
require_once(ROOT_DIR.'/controller/UserSession.php');
session_start();
$mvcController = new MVCController();
$mvcController->executeModel();
if(!isset($_POST['testaction'])){