From 694ccf2bc5d9c92b11fbca033a070739cc7eb5ad Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sat, 14 Jun 2014 18:46:40 +0200 Subject: [PATCH] Fixed /reload --- src/pocketmine/plugin/PluginBase.php | 2 +- src/pocketmine/utils/Config.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pocketmine/plugin/PluginBase.php b/src/pocketmine/plugin/PluginBase.php index 297ef34cb..260cab995 100644 --- a/src/pocketmine/plugin/PluginBase.php +++ b/src/pocketmine/plugin/PluginBase.php @@ -174,7 +174,7 @@ abstract class PluginBase implements Plugin{ * * @param string $filename * - * @return \SplFileObject Resource data, or null + * @return resource Resource data, or null */ public function getResource($filename){ $filename = rtrim(str_replace("\\", "/", $filename), "/"); diff --git a/src/pocketmine/utils/Config.php b/src/pocketmine/utils/Config.php index ee4ee85bb..307236e1d 100644 --- a/src/pocketmine/utils/Config.php +++ b/src/pocketmine/utils/Config.php @@ -39,11 +39,11 @@ class Config{ const ENUMERATION = Config::ENUM; /** @var array */ - private $config; + private $config = []; /** @var string */ private $file; /** @var boolean */ - private $correct; + private $correct = false; /** @var integer */ private $type = Config::DETECT; @@ -80,8 +80,8 @@ class Config{ * Removes all the changes in memory and loads the file again */ public function reload(){ - unset($this->config); - unset($this->correct); + $this->config = []; + $this->correct = false; unset($this->type); $this->load($this->file); }