From d38eff858905710abc243f6ebb2fb8de58b7824b Mon Sep 17 00:00:00 2001 From: Alex Solomaha Date: Sun, 27 Nov 2016 16:27:08 +0200 Subject: [PATCH] Fixes --- servers/Panel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/servers/Panel.php b/servers/Panel.php index 257aeab..a280690 100644 --- a/servers/Panel.php +++ b/servers/Panel.php @@ -935,6 +935,7 @@ class Panel implements MessageComponentInterface ]); if (!$event) { + $this->log("No event for this item [{$item->id}]"); return; } @@ -942,19 +943,18 @@ class Panel implements MessageComponentInterface $task = $event->task; foreach ($task->taskActions as $action) { - $this->doTaskAction($action, $item); + $this->doTaskAction($action); } } /** * @param TaskAction $action - * @param null $item */ - private function doTaskAction($action, $item = null) + private function doTaskAction($action) { switch ($action->type) { case TaskAction::TYPE_CHANGE_ITEM_VALUE: - $item = $item ? $item : $action->item; + $item = $action->item; switch ($item->type) { case Item::TYPE_SWITCH: