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

ork at devel.plogworld.net ork at devel.plogworld.net
Tue Feb 8 13:08:11 GMT 2005


Author: ork
Date: 2005-02-08 13:08:10 +0000 (Tue, 08 Feb 2005)
New Revision: 994

Modified:
   plog/trunk/class/config/properties.class.php
Log:
changed getValue so it won't throw any warning about 'undefined index'
anymore


Modified: plog/trunk/class/config/properties.class.php
===================================================================
--- plog/trunk/class/config/properties.class.php	2005-02-08 12:41:06 UTC (rev 993)
+++ plog/trunk/class/config/properties.class.php	2005-02-08 13:08:10 UTC (rev 994)
@@ -51,13 +51,16 @@
          */
 		function getValue( $key, $defaultValue = null )
 		{
-			$value = $this->_props[$key];
-			
-			if( empty($value))
-				if( $defaultValue != null )
-					$value = $defaultValue;
+            if( !isset($this->_props[$key]) ) {
+                return $defaultValue;
+            } else {
+			    $value = $this->_props[$key];
+			    if( empty($value) )
+                    if( $defaultValue != null )
+                        $value = $defaultValue;
 					
-			return $value;
+                return $value;
+            }
 		}
 
 		/**




More information about the pLog-svn mailing list