Skip to content

Commit 0399c14

Browse files
committed
fix for ananymous function for php 5.3
1 parent aa0f51a commit 0399c14

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Errors/ErrorHandler.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
use PhpPlatform\Errors\Exceptions\System\SystemWarning;
88

99
final class ErrorHandler {
10-
11-
private static $lastError = null;
1210

1311
static function handleError(){
1412
error_reporting(E_ALL); // enable all error reporting
@@ -44,10 +42,10 @@ static function handleError(){
4442

4543
register_shutdown_function(function(){
4644
$error = error_get_last();
47-
if(ErrorHandler::$lastError == $error){
45+
if($_ENV['lastError'] == $error){
4846
return;
4947
}
50-
ErrorHandler::$lastError = $error;
48+
$_ENV['lastError'] = $error;
5149
if(is_array($error) &&
5250
($error["type"] == E_ERROR || $error["type"] == E_PARSE || $error["type"] == E_CORE_ERROR || $error["type"] == E_COMPILE_ERROR)){
5351
if(ob_get_contents() !== false){

0 commit comments

Comments
 (0)