We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent caa49cb commit eb071fcCopy full SHA for eb071fc
1 file changed
src/Builders/Traits/AdaptiveTimerMethod.php
@@ -264,10 +264,12 @@ public function adaptiveTimerDelete(?string $id = null): void
264
}
265
if ($id === null) {
266
foreach(self::$timerIdMap as $id) {
267
- if (is_worker_version_5() and method_exists(Worker::$globalEvent, 'offDelay')) {
268
- Worker::$globalEvent->offDelay($id);
269
- } else {
270
- Worker::$globalEvent->del($id, EventInterface::EV_TIMER);
+ if (is_int($id)) {
+ if (is_worker_version_5() and method_exists(Worker::$globalEvent, 'offDelay')) {
+ Worker::$globalEvent->offDelay($id);
+ } else {
271
+ Worker::$globalEvent->del($id, EventInterface::EV_TIMER);
272
+ }
273
274
275
self::$timerIdMap = [];
@@ -282,4 +284,4 @@ public function adaptiveTimerDelete(?string $id = null): void
282
284
283
285
286
-}
287
+}
0 commit comments