From: Chuck Hagenbuch Date: Tue, 15 Jun 2010 02:20:52 +0000 (-0400) Subject: Make sure prefix is always initialized to empty. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=4f7d09cdc8c3a8568a8e9f559be5b431eeeb5384;p=horde.git Make sure prefix is always initialized to empty. We don't want to access superglobals from library constructors; if we want the prefix to be the server name by default for Horde, we should set that in the factory. --- diff --git a/framework/Cache/lib/Horde/Cache/Base.php b/framework/Cache/lib/Horde/Cache/Base.php index 2b5a17cf2..e5cf4461d 100644 --- a/framework/Cache/lib/Horde/Cache/Base.php +++ b/framework/Cache/lib/Horde/Cache/Base.php @@ -22,7 +22,8 @@ abstract class Horde_Cache_Base * @var array */ protected $_params = array( - 'lifetime' => 86400 + 'lifetime' => 86400, + 'prefix' => '', ); /** @@ -50,11 +51,6 @@ abstract class Horde_Cache_Base } $this->_params = array_merge($this->_params, $params); - if (empty($this->_params['prefix'])) { - $this->_params['prefix'] = $_SERVER['SERVER_NAME'] - ? $_SERVER['SERVER_NAME'] - : $_SERVER['HOSTNAME']; - } } /**