User tests: Successful: Unsuccessful:
When using php 5.4 and displaying in frontend the Advanced parameters in a Smart Search form (from the menu item or from the result of a search via the module, we get
Warning: Illegal string offset 'class' in ROOT/libraries/cms/html/html.php on line 965
Also, the tips for the date do not display as should;
After patch, no more Warning and the tips should display like this, when hovering the Start Date or hovering the date field (if a date has been chosen when doing a second search)
Tested with PHP 5.5.9. PR works as described.
Hello, Tested with PHP 5.5.7. it's ok.
I agree with wilsonge: "Can we move this to the in_array() statement 3/4 lines below"
think the point is the bug is that we shouldn't be putting in a string. We're supposed to have put in an array since J1.6
I agree with that but if we want only a string we should return an error instead of processing.
Also as some third party extensions are still using the string way, it's better for me to support both and better for backward compatibility.
Finally, the bug is not limited to PHP 5.4+, if you use PHP 5.3 there is no warning, but the result is not correct. It's just that PHP5.4+ it's better than telling you there is an error.
PHP 5.3 Bug Example: $attribs = " onchange='XXXXXX'";
$attribs['class'] = isset($attribs['class']) ? $attribs['class'] : 'input-medium';
var_dump($attribs);
$atttribs = "ionchange='XXXX'";
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-05-28 10:10:13 |
I merged only the TIPS part and left the Warning to
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_id=8103&tracker_item_id=32642
#3578
There is something similar to this here: #3578 but I think the point is the bug is that we shouldn't be putting in a string. We're supposed to have put in an array since J1.6