dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Work around misconfiguration by requiring strict comparisons for in_array in User...
[lhc/web/wiklou.git]
/
includes
/
User.php
diff --git
a/includes/User.php
b/includes/User.php
index
bc4b131
..
563274d
100644
(file)
--- a/
includes/User.php
+++ b/
includes/User.php
@@
-2007,7
+2007,11
@@
class User {
// In the spirit of DWIM
return true;
// In the spirit of DWIM
return true;
- return in_array( $action, $this->getRights() );
+ // PHP is fucking stupid.
+ // > $f = array( 'foo', 'bar', 'baz', 0, 'anne' );
+ // > print in_array( 'blah', $f );
+ // 1
+ return in_array( $action, $this->getRights(), true );
}
/**
}
/**