[pLog-svn] r2860 - plog/trunk/class/view

oscar at devel.lifetype.net oscar at devel.lifetype.net
Thu Jan 26 23:54:10 GMT 2006


Author: oscar
Date: 2006-01-26 23:54:10 +0000 (Thu, 26 Jan 2006)
New Revision: 2860

Modified:
   plog/trunk/class/view/view.class.php
Log:
if there is no session, these two methods should be harmful instead of forcing php to show a warning message.


Modified: plog/trunk/class/view/view.class.php
===================================================================
--- plog/trunk/class/view/view.class.php	2006-01-26 23:50:21 UTC (rev 2859)
+++ plog/trunk/class/view/view.class.php	2006-01-26 23:54:10 UTC (rev 2860)
@@ -245,6 +245,10 @@
 		 */
 		function setSessionValue( $param, $value )
 		{
+            // if there is no session data, there's nothing for us to set
+            if( !is_array( $session )) 
+                return false;		
+		
 			$session = HttpVars::getSession();
 			$viewName = get_class( $this );
 			$keyName = "{$viewName}_{$param}";
@@ -265,6 +269,11 @@
         function getSessionValue( $param, $defaultValue = "" )
         {
             $session = HttpVars::getSession();
+            
+            // if there is no session data, there's nothing for us to look for
+            if( !is_array( $session )) 
+                return false;
+            
 			$viewName = get_class( $this );
             $keyName = "{$viewName}_{$param}";
             



More information about the pLog-svn mailing list