fordtman Posted March 24, 2016 Share Posted March 24, 2016 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 More sharing options...
Arnaud_69 Posted March 24, 2016 Share Posted March 24, 2016 which version for PS ? Link to comment Share on other sites More sharing options...
jjirkajanet Posted March 24, 2016 Share Posted March 24, 2016 Same problems :Fatal error: 'continue' not in the 'loop' or 'switch' context in /Volumes/HDD/Applications/MAMP/prestaroot/modules/posmegamenu/posmegamenu.php on line 622 Link to comment Share on other sites More sharing options...
fordtman Posted April 3, 2016 Author Share Posted April 3, 2016 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 More sharing options...
Inter Svetainė Posted March 22, 2020 Share Posted March 22, 2020 To fix this error simply go to the code and everywhere You see continue which is not in the loop o switch case.. Change it to return false Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now