Last modified: 2008-01-14 14:39:48 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 T11847, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9847 - SelectCategory: selecting no categories causes a PHP warning
SelectCategory: selecting no categories causes a PHP warning
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  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: ---


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

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]
no_categories_bug.patch
Comment 2 Samuel Gélineau 2007-05-08 21:00:32 UTC
Comment on attachment 3599 [details]
no_categories_bug.patch

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.


Navigation
Links