[pLog-svn] r1827 - plog/branches/plog-1.0.1/class/locale

jondaley at devel.plogworld.net jondaley at devel.plogworld.net
Wed Apr 13 10:23:50 GMT 2005


Author: jondaley
Date: 2005-04-13 10:23:49 +0000 (Wed, 13 Apr 2005)
New Revision: 1827

Modified:
   plog/branches/plog-1.0.1/class/locale/locale.class.php
Log:
fixed run-time error. due to plugin not having locale.  Please check this fix, as this is a new part of the code for me.  It no longer crashes my plog, but I am not sure what this merge code is doing

Modified: plog/branches/plog-1.0.1/class/locale/locale.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/locale/locale.class.php	2005-04-12 17:22:44 UTC (rev 1826)
+++ plog/branches/plog-1.0.1/class/locale/locale.class.php	2005-04-13 10:23:49 UTC (rev 1827)
@@ -521,13 +521,17 @@
 		 */
 		function mergeLocale( $locale )
 		{
-			// load the file if it hadn't been loaded yet		
-			if( !is_array($this->_messages))
-				$this->_loadLocaleFile();		
+            if(isset($locale)){
+                // load the file if it hadn't been loaded yet		
+			    if( !is_array($this->_messages))
+				    $this->_loadLocaleFile();		
 		
-			$this->_messages = array_merge( $this->_messages, $locale->getStrings());
-			
-			return true;
+			    $this->_messages = array_merge( $this->_messages, $locale->getStrings());
+                return true;
+			}
+            else{
+                return false;
+            }
 		}
 	}
 ?>




More information about the pLog-svn mailing list