Avoid potential unassigned variable warning.

This commit is contained in:
Andrew McMillan 2010-06-27 19:06:27 +12:00
parent e7ad2ab06d
commit f644a31f9b

View File

@ -250,7 +250,7 @@ class HTTPAuthSession {
* @return boolean Whether or not the user has the specified role.
*/
function AllowedTo ( $whatever ) {
return ( $this->logged_in && isset($this->roles[$whatever]) && $this->roles[$whatever] );
return ( isset($this->logged_in) && $this->logged_in && isset($this->roles[$whatever]) && $this->roles[$whatever] );
}