Skip to content

Commit 4058691

Browse files
committed
Use call_user_func instead of direct callback invocation
1 parent 341ac65 commit 4058691

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Promise/ErrorHandler.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ public static function notify($error)
7575
}
7676

7777
try {
78-
$callback = self::$callback;
79-
$callback($error);
78+
\call_user_func(self::$callback, $error);
8079
} catch (\Exception $e) {
8180
// We're already a last chance handler, throwing doesn't make sense, so use a real fatal
8281
trigger_error(sprintf(

0 commit comments

Comments
 (0)