From: Mark A. Hershberger Date: Fri, 23 Apr 2010 17:29:17 +0000 (+0000) Subject: Remove code that looks like it came from Perl as it “works” (doesn't produce an error... X-Git-Tag: 1.31.0-rc.0~37032 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_user_edit%27%2C%20iduser=user.userid%29%20%7D%7D?a=commitdiff_plain;h=6fa19fc9ff0bc8a8ed576e398f02fb9f760fed27;p=lhc%2Fweb%2Fwiklou.git Remove code that looks like it came from Perl as it “works” (doesn't produce an error) but always evaluates to true. $ php -r '$a = array();var_dump($a > 0);' bool(true) --- diff --git a/includes/Title.php b/includes/Title.php index 09d68b23d8..aa6b8bf167 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1408,7 +1408,7 @@ class Title { # Several cascading protected pages may include this page... # Check each cascading level # This is only for protection restrictions, not for all actions - if( $cascadingSources > 0 && isset($restrictions[$action]) ) { + if( isset($restrictions[$action]) ) { foreach( $restrictions[$action] as $right ) { $right = ( $right == 'sysop' ) ? 'protect' : $right; if( $right != '' && !$user->isAllowed( $right ) ) {