Last modified: 2010-05-15 15:59:52 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T13801, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11801 - Warning got in includes/Title.php
Warning got in includes/Title.php
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User login and signup (Other open bugs)
1.11.x
PC Linux
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-28 21:12 UTC by Fourat ZOUARI
Modified: 2010-05-15 15:59 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Fourat ZOUARI 2007-10-28 21:12:48 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 ) )
----------------------------------
Comment 1 Brion Vibber 2007-12-05 19:29:44 UTC
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').
Comment 2 Ian Brackenbury 2008-01-14 10:15:11 UTC
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.
Comment 3 Roan Kattouw 2008-01-14 14:37:03 UTC
(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. 

Comment 4 Brion Vibber 2008-01-14 22:56:06 UTC
The default value is false to disable it.

Note that the bug was fixed in 1.12 with the reordering of various checks.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links