0

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+ ?

Dan
  • 11
  • Undefined Variable is just a notice, it shoudln't break your script. If you want to fix it, you need to declare the variable "$noscript" at the start of the page. – IsThisJavascript Sep 27 '16 at 12:14
  • Possible duplicate of [PHP: "Notice: Undefined variable" and "Notice: Undefined index"](http://stackoverflow.com/questions/4261133/php-notice-undefined-variable-and-notice-undefined-index) – devpro Sep 27 '16 at 12:17

1 Answers1

0

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.

itoctopus
  • 4,133
  • 4
  • 32
  • 44