[pLog-svn] r6145 - plog/trunk/class/config

mark at devel.lifetype.net mark at devel.lifetype.net
Fri Jan 4 04:49:25 EST 2008


Author: mark
Date: 2008-01-04 04:49:24 -0500 (Fri, 04 Jan 2008)
New Revision: 6145

Modified:
   plog/trunk/class/config/configdbstorage.class.php
   plog/trunk/class/config/configfilestorage.class.php
Log:
I prefer keep the configdbstorage and configfilestorage follow the same rule. So, the "" and "null" does not allowed in getValue(), but "false" and "0" does allowed in getValue().

Modified: plog/trunk/class/config/configdbstorage.class.php
===================================================================
--- plog/trunk/class/config/configdbstorage.class.php	2008-01-03 11:43:52 UTC (rev 6144)
+++ plog/trunk/class/config/configdbstorage.class.php	2008-01-04 09:49:24 UTC (rev 6145)
@@ -131,7 +131,7 @@
         function getValue( $key, $defaultValue = null )
         {
             if( array_key_exists($key, $this->_data) ) {
-                if ($this->_data[$key] == "" || $this->_data[$key] == null) {
+                if ($this->_data[$key] === "" || $this->_data[$key] === null) {
                     return $defaultValue;
                 } else {
                     return $this->_data[$key];

Modified: plog/trunk/class/config/configfilestorage.class.php
===================================================================
--- plog/trunk/class/config/configfilestorage.class.php	2008-01-03 11:43:52 UTC (rev 6144)
+++ plog/trunk/class/config/configfilestorage.class.php	2008-01-04 09:49:24 UTC (rev 6145)
@@ -247,7 +247,7 @@
         function getValue( $key, $defaultValue = null )
         {
         	$value = $this->_props->getValue( $key );
-            if( $value == "" || $value == null )
+            if( $value === "" || $value === null )
             	if(isset($defaultValue))
                 	$value = $defaultValue;
 



More information about the pLog-svn mailing list