@@ -111,16 +111,7 @@ public static function setupErrors(): void
111
111
112
112
set_exception_handler ([self ::class, 'handleException ' ]);
113
113
114
- set_error_handler (static function (int $ severity , string $ message , string $ file , int $ line ): ?bool {
115
- if (
116
- in_array ($ severity , [E_RECOVERABLE_ERROR , E_USER_ERROR ], true )
117
- || ($ severity & error_reporting ()) === $ severity
118
- ) {
119
- // self::handleException(new \ErrorException($message, 0, $severity, $file, $line));
120
- }
121
-
122
- return false ;
123
- });
114
+ set_error_handler ([self ::class, 'foo ' ]);
124
115
125
116
/*
126
117
register_shutdown_function(static function (): void {
@@ -142,6 +133,18 @@ public static function setupErrors(): void
142
133
});*/
143
134
}
144
135
136
+ public static function foo (int $ severity , string $ message , string $ file , int $ line ): ?bool
137
+ {
138
+ if (
139
+ in_array ($ severity , [E_RECOVERABLE_ERROR , E_USER_ERROR ], true )
140
+ || ($ severity & error_reporting ()) === $ severity
141
+ ) {
142
+ // self::handleException(new \ErrorException($message, 0, $severity, $file, $line));
143
+ }
144
+
145
+ return false ;
146
+ }
147
+
145
148
146
149
/**
147
150
* Creates global functions test(), testException(), setUp() and tearDown().
0 commit comments