No Idea
no any Warnings
Warning: Cannot use a scalar value as an array in /var/www/web3/web/libraries/cms/html/html.php on line 693
Warning messages in lines 693 694 695 696 and 697
Ubuntu 6.14 php 7.0 apache2 with php-fpm
My very first report, am not sure that my compnent has no errors in my code
I think warning generated when i use this code
JHtml::script(JUri::base() . 'components/com_rentflat/assets/test.js', true); in my default.php view
Labels |
Added:
?
|
Status | New | ⇒ | Confirmed |
Category | ⇒ | com_plugins |
dear wilsonge ,
could you pls tell how to suppress this warning
-JHtml::script(JUri::base() . 'components/com_rentflat/assets/test.js', true);
+$options = array('framework' => true);
+JHtml::script(JUri::base() . 'components/com_rentflat/assets/test.js', $options);
This should do the trick for now.
Maybe also
if (!is_array($options) || !is_array($attribs))
Should do the trick too as only one can also be passed.
I mean is if (!is_array($options)
enough?
Hi George, not really, I am struggling to fix all the issue on sites being updated. There is another B/C break associated with the changes in internal representation of the scripts. You have a B/C layer when adding a script, but because the internal representation has changed, when using $document->getHeadData(), the data returned also changed format, and this is breaking quite some code we have on the sites for enhanced caching.
Will try.
Thanks a lot
Title |
|
||||||
Status | Confirmed | ⇒ | Closed | ||||
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-04-26 19:15:54 | ||||
Closed_By | ⇒ | sanio |
@jeeperinaz can you please open a new Issue givin exact Informations as this is a closed one?
OK I can confirm this on code review. Seems like the code we added in as a b/c layer expects that you have 3 parameters (the first always being the resource, the second the mootools inclusion, 3rd the relative to media directory). Unfortunately as we are only injecting a single parameter here the b/c compatible code https://github.com/joomla/joomla-cms/blob/3.7.0/libraries/cms/html/html.php#L673-L676 isn't triggered and therefore we think we have an options array (which isn't - it's just a boolean) and everything falls apart