Jump to content

Fatal error with minicslider.php


Recommended Posts

If you are installing the latest version of Xampp (7.0.4) to create a localhost development environment and also use the free minicslider.php module be aware that you may get a fatal error similar to the following.

 

PHP Fatal error: 'continue' not in the  'loop' or 'switch' context in D:\Xampp\htdocs\shop\minicslider\minicslider.php on line 269

 

Line 269 is a continue statement that is not in a loop or continue block, replace it with an exit statement. It appears that the 'continue' statement outside of a 'loop' or 'switch' block was accepted in earlier versions of PHP but not in PHP 7. the code in Minicslider.php around line 269 reads:

 

if (!class_exists($module->name))

{

if (!file_exists(_PS_MODULE_DIR_.$module->name.'/'.$module->name,'.php'))

continue;  ***************line 269 ERROR HERE******************

require_once(_PS_MODULE_DIR_.$module->name.'/'.$module_name,'.php');

}

 

 

 

Link to comment
Share on other sites

  • 2 weeks later...

My apologies for not responding earlier, have been taking some time off. I am using Prestashop 1.6.1.4 and at the time installed Xampp 7 (which installs PHP 7), I solved the problem by reverting to Xampp 5.5.33 (PHP 5.5.33). PHP 7 does not appear to support Prestashop 1.6.1.4 at this time as I found a number of errors which do not occur when using PHP 5.5.33. I read somewhere that there are a number of "enhancements" in PHP 7 which now takes a stricter line on coding practices such as using "continue" statements in an "if" block. Somebody may be able to clarify this for us.

Link to comment
Share on other sites

  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...