From a3ad5783b74b5a447de09e1c2a32944c876de200 Mon Sep 17 00:00:00 2001 From: PEMapModder Date: Sat, 26 Sep 2015 12:21:43 +0800 Subject: [PATCH] Fixed getNested() using cache desynchroinized from set() --- src/pocketmine/utils/Config.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pocketmine/utils/Config.php b/src/pocketmine/utils/Config.php index 5de2ed4811..88d9575253 100644 --- a/src/pocketmine/utils/Config.php +++ b/src/pocketmine/utils/Config.php @@ -367,6 +367,11 @@ class Config{ */ public function set($k, $v = true){ $this->config[$k] = $v; + foreach($this->nestedCache as $nestedKey => $nvalue){ + if(substr($nestedKey, 0, strlen($k) + 1) === ($k . ".")){ + unset($this->nestedCache($nestedKey)); + } + } } /**