From eeca3516d7f2dec27f05523b4ab0a6976a758f39 Mon Sep 17 00:00:00 2001 From: DSB Date: Thu, 9 Aug 2012 19:53:40 +0000 Subject: [PATCH] Fixed bug in setParam. --- library/Msd/Config.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/library/Msd/Config.php b/library/Msd/Config.php index 9596bc6..1cbbca7 100644 --- a/library/Msd/Config.php +++ b/library/Msd/Config.php @@ -122,6 +122,10 @@ class Msd_Config */ public function getParam($paramName, $defaultValue = null) { + if (isset($this->_config[$paramName])) { + return $this->_config[$paramName]; + } + // check for section e.g. interface.theme if (strpos($paramName, '.') !== false) { list($section, $paramName) = explode('.', $paramName); @@ -132,10 +136,6 @@ class Msd_Config } } - if (isset($this->_config[$paramName])) { - return $this->_config[$paramName]; - } - return $defaultValue; } @@ -150,7 +150,7 @@ class Msd_Config */ public function setParam($paramName, $paramValue) { - if (strpos('paramName', '.') !== false) { + if (strpos($paramName, '.') !== false) { list($section, $paramName) = explode('.', $paramName); $this->_config[$section][$paramName] = $paramValue; } else {