Just to be sure, have you checked out via github?
The issue was in the call to getAllowedPages, if you like you could test the output of that call by creating a script with the following content and executing it with php (replace test for your username):
filename: /tmp/test.php
content:
<?phperror_reporting(E_ALL);require_once("auth.inc");require_once("priv.inc");print_r( getAllowedPages("test") );?>
executing : php /tmp/test.php should deliver something like:
Array
(
[0] => *
[1] => index.php*
[2] => *.widget.php*
[3] => graph.php*
[4] => graph_cpu.php*
.....
)