From 4f7d09cdc8c3a8568a8e9f559be5b431eeeb5384 Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Mon, 14 Jun 2010 22:20:52 -0400 Subject: [PATCH] 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. --- framework/Cache/lib/Horde/Cache/Base.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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']; - } } /** -- 2.11.0