|
|
@@ -68,6 +68,18 @@ class Error
|
|
|
*/
|
|
|
public static function appError($errno, $errstr, $errfile = '', $errline = 0)
|
|
|
{
|
|
|
+
|
|
|
+ // 7.4 兼容:废弃警告(E_DEPRECATED)不再当作异常抛出,避免老库 PHPExcel 的 {} 字符串偏移语法导致导出崩溃
|
|
|
+ if ($errno === E_DEPRECATED) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 7.4兼容,阻止数组校验抛异常
|
|
|
+ if ($errno === 8 && strpos($errstr, 'Trying to access array offset on value of type') !== false) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
$exception = new ErrorException($errno, $errstr, $errfile, $errline);
|
|
|
if (error_reporting() & $errno) {
|
|
|
// 将错误信息托管至 think\exception\ErrorException
|