Undefined variable: noscript in

177 Views Asked by At

I have a php script Jumi installed on Joomla and the error log is full with this error:

Undefined variable: noscript in /public_html/plugins/system/jumi/jumi.php on line 102

It seems that Jumi is not optimized for PHP 5.4

line 102>> $content = str_replace('', $noscript . '', $content);

103>> JResponse::setBody($content);

Can I change this line to make it compatible with PHP 5.4+ ?

1

There are 1 best solutions below

1
itoctopus On

Which version of Jumi do you have? The last version doesn't have this problem. In any case, $noscript is just there to add some <noscript> message (if the person doesn't have JavaScript enabled), which is not critical for the operation of your website. You can safely add the following before line 102:

$noscript = '';

If you really need to display a warning for those who don't have JavaScript, then add the following line instead (before line 102):

$noscript = '<noscript><strong>JavaScript is currently disabled.</strong>Please enable it for a better experience of Jumi.</noscript>';

You can always update to the latest Jumi version to get rid of this problem.