From 3ade40944271b5145ce5a6dd1a79af015a5123f2 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 19 May 2017 21:34:33 +0200 Subject: [PATCH] hotfix --- src/Worker.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Worker.php b/src/Worker.php index 8b58e5f9..b39f793a 100644 --- a/src/Worker.php +++ b/src/Worker.php @@ -64,6 +64,9 @@ if (!extension_loaded('pthreads')) { private function runCollectable($idx, Collectable $collectable) { $collectable->worker = $this; + if (!isset($collectable->state)) { + $collectable->state = 0; + } $collectable->state |= THREAD::RUNNING; $collectable->run(); $collectable->state &= ~THREAD::RUNNING;