dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42a85c0
)
Work around misconfiguration by requiring strict comparisons for in_array in User...
author
Andrew Garrett
<werdna@users.mediawiki.org>
Wed, 17 Sep 2008 07:26:34 +0000
(07:26 +0000)
committer
Andrew Garrett
<werdna@users.mediawiki.org>
Wed, 17 Sep 2008 07:26:34 +0000
(07:26 +0000)
includes/User.php
patch
|
blob
|
history
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;
- 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 );
}
/**