com web/wiki: Check if the user is logged in first: dokuwiki/lib/plugins/doodle/syntax.php

From: Date: Mon, 30 Dec 2013 07:51:57 +0000
Subject: com web/wiki: Check if the user is logged in first: dokuwiki/lib/plugins/doodle/syntax.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-17920@lists.php.net to get a copy of this message
Commit: c028a92fc1cadb0b7a3ededeb37f45a8ef4cfb80 Author: Hannes Magnusson <bjori@mongodb.com> Sun, 29 Dec 2013 23:51:57 -0800 Parents: 1095ed33452215303359bb11485b0f5583348000 Branches: master Link: http://git.php.net/?p=web/wiki.git;a=commitdiff;h=c028a92fc1cadb0b7a3ededeb37f45a8ef4cfb80 Log: Check if the user is logged in first Avoids an not-an-array warning Changed paths: M dokuwiki/lib/plugins/doodle/syntax.php Diff: diff --git a/dokuwiki/lib/plugins/doodle/syntax.php b/dokuwiki/lib/plugins/doodle/syntax.php index 9811e73..0eaba76 100755 --- a/dokuwiki/lib/plugins/doodle/syntax.php +++ b/dokuwiki/lib/plugins/doodle/syntax.php @@ -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) -----

« previous php.webmaster (#17920) next »