Max F 5 роки тому
батько
коміт
5bf0b7ed4d
1 змінених файлів з 6 додано та 1 видалено
  1. 6 1
      src/WebApp.php

+ 6 - 1
src/WebApp.php

@@ -120,7 +120,7 @@ class WebApp extends App
 	}
 
 
-	public static function error($http_status = 500, $meta_title = 'Server Error', $h1 = 'Error 500 - Server Error', $message = 'an error has occured', $error_template = 'error.tpl.php')
+	public static function error($http_status = 500, $meta_title = 'Server Error', $h1 = 'Error 500 - Server Error', $message = 'an error has occured')
 	{
 		if (! self::$controller) {
 			self::$controller = new WebAppController();
@@ -131,6 +131,11 @@ class WebApp extends App
 			$template->assign('p', $message);
 			$template->assign('http_status', $http_status);
 
+			$error_template = 'error.tpl.php';
+			if (defined('ERROR_TEMPLATE')) {
+				$error_template = ERROR_TEMPLATE;
+			}
+
 			$template->display($error_template);
 
 		} else {