修复: orders.php诊断错误处理中E_RECOVERABLE_ERROR误用冒号导致PHP Parse error(整页崩溃/loadOrders未定义)
- 第12行数组 E_RECOVERABLE_ERROR:'Recoverable' 误用冒号(应为 =>),导致PHP解析失败、整页只输出Parse error、所有前端JS函数(loadOrders等)缺失 - 改为 E_RECOVERABLE_ERROR=>'Recoverable',页面恢复正常(实测线上HTTP 200、STATE JSON有效、全部JS函数就位)
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', '0');
|
||||
set_error_handler(function($errno, $errstr, $errfile, $errline) {
|
||||
$types = [E_WARNING=>'Warning',E_NOTICE=>'Notice',E_USER_ERROR=>'UserError',E_USER_WARNING=>'UserWarning',E_USER_NOTICE=>'UserNotice',E_STRICT=>'Strict',E_DEPRECATED=>'Deprecated',E_RECOVERABLE_ERROR:'Recoverable'];
|
||||
$types = [E_WARNING=>'Warning',E_NOTICE=>'Notice',E_USER_ERROR=>'UserError',E_USER_WARNING=>'UserWarning',E_USER_NOTICE=>'UserNotice',E_STRICT=>'Strict',E_DEPRECATED=>'Deprecated',E_RECOVERABLE_ERROR=>'Recoverable'];
|
||||
$type = isset($types[$errno]) ? $types[$errno] : "Error[$errno]";
|
||||
if (file_exists(__DIR__ . '/core.php')) {
|
||||
// core.php may not be loaded yet, define minimal debugLog
|
||||
|
||||
Reference in New Issue
Block a user