File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,8 @@ public function write($data)
190
190
* continued sending the data, we will catch feof() only after some time
191
191
*/
192
192
$ oreporting = error_reporting (E_ALL );
193
- $ ohandler = set_error_handler (function ($ severity , $ text ) {
193
+ set_error_handler (function ($ severity , $ text ) {
194
+ //$ohandler = set_error_handler(function($severity, $text) {
194
195
throw new \RuntimeException ('fwrite() error ( ' . $ severity . '): ' . $ text );
195
196
});
196
197
@@ -228,13 +229,15 @@ public function write($data)
228
229
* Restore original handlers after normal operations
229
230
*/
230
231
error_reporting ($ oreporting );
231
- set_error_handler ($ ohandler );
232
+ //set_error_handler($ohandler);
233
+ restore_error_handler ();
232
234
} catch (\Exception $ t ) {
233
235
/**
234
236
* Restore original handlers if exception happens
235
237
*/
236
238
error_reporting ($ oreporting );
237
- set_error_handler ($ ohandler );
239
+ //set_error_handler($ohandler);
240
+ restore_error_handler ();
238
241
throw new RuntimeException ($ t ->getMessage (), $ t ->getCode ());
239
242
}
240
243
}
You can’t perform that action at this time.
0 commit comments