Last modified: 2011-06-23 15:25:33 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 T30928, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28928 - PHP NOTICE in wfArrayToCGI
PHP NOTICE in wfArrayToCGI
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-11 05:55 UTC by Niklas Laxström
Modified: 2011-06-23 15:25 UTC (History)
3 users (show)

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


Attachments

Description Niklas Laxström 2011-05-11 05:55:03 UTC
[11-May-2011 02:23:07] /wiki/User:Nike/contenido/includes/include.lay_subnav.php?cfg[path][contenido]=test??: Exception: Ask nike
#0 /www/w/includes/WebRequest.php(584): wfArrayToCGI(Array)
#1 /www/w/includes/WebRequest.php(568): WebRequest->appendQueryArray(Array, true)
#2 /www/w/includes/SkinTemplate.php(1184): WebRequest->appendQueryValue('printable', 'yes', true)
#3 /www/w/includes/SkinTemplate.php(500): SkinTemplate->buildNavUrls(Object(OutputPage))
#4 /www/w/includes/OutputPage.php(1905): SkinTemplate->outputPage(Object(OutputPage))
#5 /www/w/includes/Wiki.php(401): OutputPage->output()
#6 /www/w/index.php(150): MediaWiki->finalCleanup()
#7 {main}



1266-   foreach ( $array1 as $key => $value ) {
1267-           if ( $value !== '' ) {
1268-                   if ( $cgi != '' ) {
1269-                           $cgi .= '&';
1270-                   }
1271-                   if ( is_array( $value ) ) {
1272-                           $firstTime = true;
1273-                           foreach ( $value as $v ) {
1274-                                   if ( !is_string( $v ) ) {                                                                                                                  
1275:                                           throw new MWException("Ask nike");
Comment 1 Brion Vibber 2011-05-11 18:26:38 UTC
Is this an E_NOTICE or an exception? I don't see any code that throws an exception with the message 'Ask nike', and there doesn't seem to be a line number or anything referring to any particular code inside wfArrayToCGI.
Comment 2 Niklas Laxström 2011-05-11 18:29:30 UTC
The notice would be an array to string conversion or some such. I just hacked exception there to get a backtrace.
Comment 3 Brion Vibber 2011-05-11 18:29:40 UTC
Oh I see -- that's alternate code to throw an exception at the point where an E_NOTICE would have been thrown...?

Seems to be a multiple-level array in the input, which wfArrayToCGI doesn't expect.
Comment 4 Niklas Laxström 2011-05-11 18:30:27 UTC
The notice would be an array to string conversion or some such. I just hacked exception there to get a backtrace.
Comment 5 Max Semenik 2011-05-11 18:48:16 UTC
Since you've already hacked the source, can you dump that function's input?
Comment 6 Niklas Laxström 2011-05-11 18:51:34 UTC
Should not be hard to guess from the request url.
Comment 7 Matěj Grabovský 2011-06-23 15:25:33 UTC
Fixed with r90661.

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


Navigation
Links