Skip to content

Commit

Permalink
Make sure storage is populated when fetching groups
Browse files Browse the repository at this point in the history
Fixes #55
  • Loading branch information
nilshoerrmann committed Jul 1, 2013
1 parent 55f71ba commit 021e79e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/class.storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ public function getErrors() {
* Return all existing groups as array
*/
public function getGroups() {
return array_keys($_SESSION[$this->_index]);
if(is_array($_SESSION[$this->_index]) {
return array_keys($_SESSION[$this->_index]);
}
else {
return array();
}
}

/**
Expand Down

0 comments on commit 021e79e

Please sign in to comment.