summaryrefslogtreecommitdiff
path: root/includes/User.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/User.php')
-rw-r--r--includes/User.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/User.php b/includes/User.php
index 5c129819..4e39d678 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -1859,7 +1859,9 @@ class User {
// In the spirit of DWIM
return true;
- return in_array( $action, $this->getRights() );
+ # Use strict parameter to avoid matching numeric 0 accidentally inserted
+ # by misconfiguration: 0 == 'foo'
+ return in_array( $action, $this->getRights(), true );
}
/**