From b1367bce488d0acea00a5ebf8725d0cde5515655 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 22 Apr 2011 00:15:05 +0200 Subject: [PATCH] [ticket/10141] Split double-assignment into conditional and unconditional part. PHPBB3-10141 --- phpBB/includes/auth.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php index 22fafd7b7f..4b13c6be7f 100644 --- a/phpBB/includes/auth.php +++ b/phpBB/includes/auth.php @@ -126,15 +126,13 @@ class auth while ($subseq = substr($seq, $i, 6)) { - if (isset($seq_cache[$subseq])) + if (!isset($seq_cache[$subseq])) { - $this->acl[$f] .= $seq_cache[$subseq]; - } - else - { - // We put the original bitstring into the acl array - $this->acl[$f] .= ($seq_cache[$subseq] = str_pad(base_convert($subseq, 36, 2), 31, 0, STR_PAD_LEFT)); + $seq_cache[$subseq] = str_pad(base_convert($subseq, 36, 2), 31, 0, STR_PAD_LEFT); } + + // We put the original bitstring into the acl array + $this->acl[$f] .= $seq_cache[$subseq]; $i += 6; } }