summaryrefslogtreecommitdiff
path: root/inc/auth.php
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2013-10-16 22:04:01 +0100
committerChristopher Smith <chris@jalakai.co.uk>2013-10-16 22:04:01 +0100
commit443e135d59e9d227eec818dabf9ee64d7a73d474 (patch)
tree14c649d0a1fade810971d7e6da53471b41484fdf /inc/auth.php
parent4d8acaacee33f49d51c06f6dae1dbe245018a020 (diff)
downloadrpg-443e135d59e9d227eec818dabf9ee64d7a73d474.tar.gz
rpg-443e135d59e9d227eec818dabf9ee64d7a73d474.tar.bz2
replace boolean conditional checks on possibly uninitialized vars with \!empty/empty/isset as appropriate
Diffstat (limited to 'inc/auth.php')
-rw-r--r--inc/auth.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/auth.php b/inc/auth.php
index ac079c574..0d42c8673 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -139,10 +139,10 @@ function auth_loadACL() {
$out = array();
foreach($acl as $line) {
$line = trim($line);
- if($line{0} == '#') continue;
+ if(empty($line) || ($line{0} == '#')) continue; // skip blank lines & comments
list($id,$rest) = preg_split('/\s+/',$line,2);
- // substitue user wildcard first (its 1:1)
+ // substitute user wildcard first (its 1:1)
if(strstr($line, '%USER%')){
// if user is not logged in, this ACL line is meaningless - skip it
if (!isset($_SERVER['REMOTE_USER'])) continue;