Last modified: 2012-10-29 15:12:29 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 T35271, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33271 - array_merge(): Argument #2 is not an array in /www/w/includes/specials/SpecialBlock.php
array_merge(): Argument #2 is not an array in /www/w/includes/specials/Specia...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User blocking (Other open bugs)
1.20.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-20 11:20 UTC by Niklas Laxström
Modified: 2012-10-29 15:12 UTC (History)
4 users (show)

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


Attachments

Description Niklas Laxström 2011-12-20 11:20:28 UTC
PHP Warning:  array_merge(): Argument #2 is not an array in /www/w/includes/specials/SpecialBlock.php on line 718

When re-blocking a user.
Comment 1 Bawolff (Brian Wolff) 2011-12-21 07:24:23 UTC
Hmm, I don't see how this could possibly happen. I assume you don't have any custom extensions hooking into PerformRetroactiveAutoblock ? (Nothing in the repo uses that hook, but thought i'd check)
Comment 2 Niklas Laxström 2011-12-21 07:59:54 UTC
Not as far as I know.
Comment 3 Max Semenik 2011-12-21 08:04:30 UTC
I couldn't reproduce it either.
Comment 4 Niklas Laxström 2011-12-21 08:30:34 UTC
$status = false;

> array_merge( array( $status['id'] ), $status['autoIds']  );

Warning: array_merge(): Argument #2 is not an array in /www/sandwiki/maintenance/eval.php(77) : eval()'d code on line 1
Comment 5 Niklas Laxström 2011-12-21 08:32:19 UTC
I should note that Special:Block has become very slow recently, often timing out.
Comment 6 Bawolff (Brian Wolff) 2011-12-21 08:35:35 UTC
Re-read the code. First time I read through I thought the part that checked if status was false returned in both branches of the if but it doesn't.

So it could happen if while in the process of re-blocking, someone inserts a block just after the old block was removed I think.
Comment 7 Aaron Schulz 2011-12-21 08:44:41 UTC
The delete() would block on the EX lock of the insert by the other process and then lock the index gap for the row in delete()...so the shouldn't the second insert() always work?

That said, the code should still check for this, since some people use MyISAM...which sucks for MW but whatever.
Comment 8 Niklas Laxström 2011-12-21 08:53:59 UTC
(In reply to comment #5)
> I should note that Special:Block has become very slow recently, often timing
> out.

This seems to be unrelated. On further inspection the POST request never arrives into lighttpd's access nor error log. Sigh. I hate computers.
Comment 9 Niklas Laxström 2011-12-21 08:57:04 UTC
(In reply to comment #7)
> That said, the code should still check for this, since some people use
> MyISAM...which sucks for MW but whatever.

FYI: twn is using InnoDb for almost all tables.
Comment 10 Niklas Laxström 2012-10-29 15:12:29 UTC
Assuming fixed, it's been a year and not seen this recently.

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


Navigation
Links