From 3bc352a25f94b129a6da416537d18a4bba92e1bb Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Sun, 6 Dec 2015 11:18:15 +0100 Subject: [PATCH] Fix for PHP 7 fatal error on duplicate parameter names in closures --- src/ExtEventLoop.php | 2 +- src/LibEventLoop.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ExtEventLoop.php b/src/ExtEventLoop.php index 48657f96..7160c908 100644 --- a/src/ExtEventLoop.php +++ b/src/ExtEventLoop.php @@ -294,7 +294,7 @@ private function unsubscribeStreamEvent($stream, $flag) */ private function createTimerCallback() { - $this->timerCallback = function ($_, $_, $timer) { + $this->timerCallback = function ($_, $__, $timer) { call_user_func($timer->getCallback(), $timer); if (!$timer->isPeriodic() && $this->isTimerActive($timer)) { diff --git a/src/LibEventLoop.php b/src/LibEventLoop.php index 6fbc8269..99417a12 100644 --- a/src/LibEventLoop.php +++ b/src/LibEventLoop.php @@ -298,7 +298,7 @@ private function unsubscribeStreamEvent($stream, $flag) */ private function createTimerCallback() { - $this->timerCallback = function ($_, $_, $timer) { + $this->timerCallback = function ($_, $__, $timer) { call_user_func($timer->getCallback(), $timer); // Timer already cancelled ...