User tests: Successful: Unsuccessful:
This PR does two things:
array_unique
functionHow to reproduce notices?
$html = new JDocumentHtml();
$html->addHeadLink('http://www.example.com', 'Start');
$html->addHeadLink('http://www.example.com/end', 'End');
$html->mergeHeadData($html->getHeadData());
generates several:
PHP Notice: Array to string conversion in /home/[...]/libraries/joomla/document/html.php on line 222
And $html->_links
contain only first link.
After patch this notice disappears and links contain all links.
No
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
As you can see it is expected.
Labels |
Added:
?
|
Category | Libraries | ⇒ | Libraries Unit Tests |
Title |
|
This is a simple fix + extend test. if no one is interested?
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC. Thanks!
Labels |
Added:
?
|
Awesome, glad to see someone found a solution without needing to wait for HHVM to fix the special casing for <= 1
elements with array_merge()
Note: we would have had the same error in php if the top level of the nested array had just one more element
https://3v4l.org/vHUAv
Milestone changed to 3.7 as it is now not planned to have a 3.6.4 release
Labels |
Added:
?
Removed: ? |
Labels |
Added:
?
Removed: ? |
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-10-18 17:32:45 |
Closed_By | ⇒ | rdeutz |
Labels |
Removed:
?
|
Why do we have an array here. Is it expected or is it a bug in the test data?