From 60bc72c6cbd3c9899a985b31c77d41d3288c69c4 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Wed, 29 Jan 2014 20:41:57 +0100 Subject: [PATCH] Fixed undefined indexes on cases where plugins did things wrong --- src/PocketMinecraftServer.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/PocketMinecraftServer.php b/src/PocketMinecraftServer.php index 5f2ab749b..d3cc36416 100644 --- a/src/PocketMinecraftServer.php +++ b/src/PocketMinecraftServer.php @@ -629,11 +629,10 @@ class PocketMinecraftServer{ $this->preparedSQL->updateAction->bindValue(":time", $time, SQLITE3_FLOAT); $this->preparedSQL->updateAction->bindValue(":id", $cid, SQLITE3_INTEGER); $this->preparedSQL->updateAction->execute(); - $schedule = $this->schedule[$cid]; - if(!is_callable($schedule[0])){ + if(!@is_callable($this->schedule[$cid][0])){ $return = false; }else{ - $return = call_user_func($schedule[0], $schedule[1], $schedule[2]); + $return = call_user_func($this->schedule[$cid][0], $this->schedule[$cid][1], $this->schedule[$cid][2]); } if($action["repeat"] == 0 or $return === false){