Last modified: 2008-01-14 14:39:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 9847 - SelectCategory: selecting no categories causes a PHP warning
SelectCategory: selecting no categories causes a PHP warning
Product: MediaWiki extensions
Classification: Unclassified
General/Unknown (Other open bugs)
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2007-05-08 20:55 UTC by Samuel Gélineau
Modified: 2008-01-14 14:39 UTC (History)
1 user (show)

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

no_categories_bug.patch (686 bytes, patch)
2007-05-08 20:58 UTC, Samuel Gélineau

Description Samuel Gélineau 2007-05-08 20:55:04 UTC
When saving, the following PHP warning shows up unless at least one category is
selected in the select box.

Warning:  Invalid argument supplied for foreach() in
/var/www/wiki/extensions/SelectCategory/SelectCategoryFunctions.php on line 92
Comment 1 Samuel Gélineau 2007-05-08 20:58:54 UTC
Created attachment 3599 [details]
Comment 2 Samuel Gélineau 2007-05-08 21:00:32 UTC
Comment on attachment 3599 [details]

checks for $_POST["SelectCategoryList"]'s presence
Comment 3 Rob Church 2007-05-08 21:30:23 UTC
In general, we prefer to use the WebRequest object (global instance $wgRequest)
to handle incoming GET/POST data.
Comment 4 Samuel Gélineau 2007-05-09 12:47:50 UTC
As you can see in the patch`s contents, I merely followed the file`s existing style, which used $_POST.
Comment 5 WIKImaniac 2008-01-14 14:39:48 UTC
The bug doesn't occur in revision 29737 any more.

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