Skip to content
This repository was archived by the owner on Dec 9, 2023. It is now read-only.

Commit 518c6a0

Browse files
minor #36898 [Debug] php 8 does not pass $context to error handlers (derrabus)
This PR was merged into the 3.4 branch. Discussion ---------- [Debug] php 8 does not pass $context to error handlers | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | #36872 | License | MIT | Doc PR | N/A php 8 will call error handlers without the optional `$context` parameter. Thus, error handlers that make that parameter mandatory will break. Commits ------- 593897c9e1 [Debug] php 8 does not pass $context to error handlers.
2 parents 44897cd + 2560754 commit 518c6a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/Fixtures/ErrorHandlerThatUsesThePreviousOne.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public static function register()
1515
return $handler;
1616
}
1717

18-
public function handleError($type, $message, $file, $line, $context)
18+
public function handleError()
1919
{
20-
return \call_user_func(self::$previous, $type, $message, $file, $line, $context);
20+
return \call_user_func_array(self::$previous, \func_get_args());
2121
}
2222
}

0 commit comments

Comments
 (0)