Check if the user is logged in first

Avoids an not-an-array warning
This commit is contained in:
Hannes Magnusson
2013-12-29 23:51:57 -08:00
parent 1095ed3345
commit c028a92fc1

View File

@ -223,7 +223,7 @@ class syntax_plugin_doodle extends DokuWiki_Syntax_Plugin
//FIXME: count($choices) may be different from number of choices in $doodle data!
$can_vote = false;
if (count(array_intersect(array('admin', 'phpcvs', 'voting'), $INFO['userinfo']['grps'])) > 0) {
if ($INFO["userinfo"] && count(array_intersect(array('admin', 'phpcvs', 'voting'), $INFO['userinfo']['grps'])) > 0) {
$can_vote = true;
}
// ----- FORM ACTIONS (only allowed when showing the most recent version of the page, not when editing) -----