[pLog-svn] r855 - plog/trunk/class/config
ork at devel.plogworld.net
ork at devel.plogworld.net
Thu Jan 27 00:49:19 GMT 2005
Author: ork
Date: 2005-01-27 00:49:18 +0000 (Thu, 27 Jan 2005)
New Revision: 855
Modified:
plog/trunk/class/config/configdbstorage.class.php
Log:
changed getValue to not throw warnings on empty keys
Modified: plog/trunk/class/config/configdbstorage.class.php
===================================================================
--- plog/trunk/class/config/configdbstorage.class.php 2005-01-27 00:37:31 UTC (rev 854)
+++ plog/trunk/class/config/configdbstorage.class.php 2005-01-27 00:49:18 UTC (rev 855)
@@ -141,13 +141,13 @@
function getValue( $key, $defaultValue = null )
{
-
- $value = $this->_data[$key];
- if( $value == "" || $value == null )
- if( $defaultValue != null )
- $value = $defaultValue;
-
- return $value;
+ if(!array_key_exists($key, $this->_data) ||
+ $this->_data[$key] == "" ||
+ $this->_data[$key] == null) {
+ return $defaultValue;
+ } else {
+ return $this->_data[$key];
+ }
}
function setValue( $key, $value )
More information about the pLog-svn
mailing list