Index: trunk/phase3/includes/User.php |
— | — | @@ -2003,10 +2003,8 @@ |
2004 | 2004 | // In the spirit of DWIM |
2005 | 2005 | return true; |
2006 | 2006 | |
2007 | | - // PHP is fucking stupid. |
2008 | | - // > $f = array( 'foo', 'bar', 'baz', 0, 'anne' ); |
2009 | | - // > print in_array( 'blah', $f ); |
2010 | | - // 1 |
| 2007 | + # Use strict parameter to avoid matching numeric 0 accidentally inserted |
| 2008 | + # by misconfiguration: 0 == 'foo' |
2011 | 2009 | return in_array( $action, $this->getRights(), true ); |
2012 | 2010 | } |
2013 | 2011 | |