From 6fa19fc9ff0bc8a8ed576e398f02fb9f760fed27 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Fri, 23 Apr 2010 17:29:17 +0000 Subject: [PATCH] =?utf8?q?Remove=20code=20that=20looks=20like=20it=20came?= =?utf8?q?=20from=20Perl=20as=20it=20=E2=80=9Cworks=E2=80=9D=20(doesn't=20?= =?utf8?q?produce=20an=20error)=20but=20always=20evaluates=20to=20true.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit $ php -r '$a = array();var_dump($a > 0);' bool(true) --- includes/Title.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) ) { -- 2.20.1