From: Michael M Slusarz Date: Thu, 9 Dec 2010 21:53:01 +0000 (-0700) Subject: Bug #9431: Fix infinite loop when prefs_init hook function recursively accessed the... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e1ebef8ce90ec34c90cbdad856afc555e15b1c3f;p=horde.git Bug #9431: Fix infinite loop when prefs_init hook function recursively accessed the prefs object --- diff --git a/framework/Prefs/lib/Horde/Prefs.php b/framework/Prefs/lib/Horde/Prefs.php index c5cd30b0c..f7f7af8e7 100644 --- a/framework/Prefs/lib/Horde/Prefs.php +++ b/framework/Prefs/lib/Horde/Prefs.php @@ -350,13 +350,16 @@ class Horde_Prefs implements ArrayAccess $scope_ob = new Horde_Prefs_Scope($scope); $scope_ob->init = true; + // Need to set object in scopes array now, since the storage object + // might recursively call the prefs object. + $this->_scopes[$scope] = $scope_ob; + foreach ($this->_storage as $storage) { $scope_ob = $storage->get($scope_ob); } $scope_ob->init = false; - $this->_scopes[$scope] = $scope_ob; $this->_cache->store($scope_ob); }