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

Jon Daley plogworld at jon.limedaley.com
Fri Jan 27 22:20:03 GMT 2006


 	I don't really know, but I saw that this change looks kind of 
strange.  Is the if(session) check supposed to be before the session 
variable is assigned on the next line?

On Thu, 26 Jan 2006, oscar at devel.lifetype.net wrote:
> 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}";


More information about the pLog-svn mailing list