Last modified: 2010-05-15 15:59:52 UTC
Got this warning: ---------------------------------- <b> Warning </b> : in_array() [ <a href="function.in-array"> function.in-array </a> ]: Wrong datatype for second argument in <b> /var/www/TriKi/includes/Title.php </b> on line <b> 1306 </b> ---------------------------------- Steps to reproduce: Created new groups in LocalSettings.php, and tryed to affect a User one of the new available groups. A temporary (?) correction i can make is: ---------------------------------- 1306c1306 < if( ( is_array($wgWhitelistRead) ) && ( in_array( $pure, $wgWhitelistRead, true ) ) ) --- > if( in_array( $pure, $wgWhitelistRead, true ) ) ----------------------------------
This seems to be resolved in 1.12 branch (trunk); Title::userCanRead() has been restructured a bit, and the func will bail out earlier if the whitelist isn't an array (eg left as default 'false').
When confirming e-mail address for the 1st time in a new install of mediaWiki 1.11.0 a message was displayed saying that there was a type mismatch in argument 2 of a function call on line 1306 of includes/Title.php if( in_array( $pure, $wgWhitelistRead, true ) ) There were no discernable ill-effects so far, the e-mail address was verified OK. I think this is similar to the above bug but might be worth quick check that the earlier baleout will catch this too? ...Ian.
(In reply to comment #2) > When confirming e-mail address for the 1st time in a new install of mediaWiki > 1.11.0 a message was displayed saying that there was a type mismatch in > argument 2 of a function call on line 1306 of includes/Title.php > > if( in_array( $pure, $wgWhitelistRead, true ) ) You should set $wgWhitelistRead = array(); in LocalSettings.php to get rid of that warning.
The default value is false to disable it. Note that the bug was fixed in 1.12 with the reordering of various checks.