Last modified: 2013-04-22 16:14:47 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 T41875, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39875 - Array values for attributes in Html::element cause PHP notice.
Array values for attributes in Html::element cause PHP notice.
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
https://gerrit.wikimedia.org/r/22278
:
: 39650 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-01 01:25 UTC by Tyler Romeo
Modified: 2013-04-22 16:14 UTC (History)
2 users (show)

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


Attachments

Description Tyler Romeo 2012-09-01 01:25:22 UTC
Found by SPQRobin.

Notice: Array to string conversion in /home/robin/public_html/mw/dev/includes/Html.php on line 328":
the classes attribute should be passed as a string instead of an array. Introduced in c13632.

Seems to be because Html::dropDefaults() calls strval() on all attribute values, but Html allows arrays as attribute values, which causes a problem. Change to soon be in gerrit.
Comment 1 Tyler Romeo 2012-09-01 01:27:03 UTC
https://gerrit.wikimedia.org/r/22287
Comment 2 Robin Pepermans (SPQRobin) 2012-09-01 03:50:43 UTC
Thanks. I had the impression arrays were not allowed, but they are so your change is a better fix for the problem.
Comment 3 Tyler Romeo 2012-09-01 03:52:45 UTC
Yeah. Originally I saw the patch and thought to myself "Hmm, why not just accept arrays in Html?", and then I looked and saw it was already accepted. :P

On a side note, I left a comment on https://gerrit.wikimedia.org/r/22005 concerning this, because Hashar is making a whole new test case for the dropDefaults() function, and this would be a perfect addition.
Comment 4 Andre Klapper 2012-12-17 01:08:49 UTC
*** Bug 39650 has been marked as a duplicate of this bug. ***

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


Navigation
Links