PEGGY1233456 Posted November 15, 2017 Share Posted November 15, 2017 Bonjour La communauté! Je tourne sur la version prestashop 1.6.1.17 serveur ovh mutualisé offre performance. Je voudrais passer en php 7 mais si je passe en php 7 page blanche en F.O. En activant le mode debug voici l'erreur que j'ai: Fatal error: 'continue' not in the 'loop' or 'switch' context in /home/pearlacc/www/modules/leomanagewidgets/leomanagewidgets.php on line 1343 [PrestaShop] Fatal error in module file :/home/pearlacc/www/modules/leomanagewidgets/leomanagewidgets.php: 'continue' not in the 'loop' or 'switch' context Donc je vais voir dans dans le fichier en question la ligne en question et je trouve: if ($use_push && !$moduleInstance->allow_push) continue; Après je ne sais pas quoi faire pour corriger c'est là ou j'ai besoin de vous. Quelqu'un peut-il me guider sur la correction à mettre en place pour que ça fonctionne? Merci de votre aide par avance. Bien à vous Peggy. Mon site :www.pearlaccess.com Link to comment Share on other sites More sharing options...
doekia Posted November 15, 2017 Share Posted November 15, 2017 (edited) Mon conseil N°1 ne pas utiliser php7 pour prestashop 1.6.x Après le plus simple est encore de contacter le développeur du thème/module pour qu'il corrige son code. Tu peux également commenter la ligne: // if ($use_push && !$moduleInstance->allow_push) { // continue; // } Edited November 15, 2017 by doekia (see edit history) 1 1 Link to comment Share on other sites More sharing options...
PEGGY1233456 Posted November 15, 2017 Author Share Posted November 15, 2017 Merci Doekia pour avoir pris le temps de me donner des pistes et solutions! pourquoi tu déconseilles le php 7? Link to comment Share on other sites More sharing options...
Monovolador Posted February 28, 2018 Share Posted February 28, 2018 Did you get any solution? I have the same problem in www.farma-amparo.es... I've contacted with Leotheme but I don't know if I will receive any answer. The problem is the same, when we change PHP version from 5.6.30 to 7.0.15(FPM) in hosting server, the website is blank. After checking error_log file, the problem is on leomanagewidgets.php file on line 1403. // Check errors if ((bool)$disable_non_native_modules && Hook::$native_module && count(Hook::$native_module) && !in_array($module_name, self::$native_module)) return; if (!($moduleInstance = Module::getInstanceByName($module_name))) return; if ($use_push && !$moduleInstance->allow_push) continue; //THIS LINE IS 1403(ERROR) // Check which / if method is callable $hook_callable = is_callable(array($moduleInstance, 'hook'.$hook_name)); $hook_retro_callable = is_callable(array($moduleInstance, 'hook'.$retro_hook_name)); if (($hook_callable || $hook_retro_callable) && Module::preCall($moduleInstance->name)) { $hook_args['altern'] = ++$altern; if ($use_push && isset($moduleInstance->push_filename) && file_exists($moduleInstance->push_filename)) Tools::waitUntilFileIsModified($moduleInstance->push_filename, $moduleInstance->push_time_limit); // Call hook method if ($hook_callable) $display = $moduleInstance->{'hook'.$hook_name}($hook_args); elseif ($hook_retro_callable) $display = $moduleInstance->{'hook'.$retro_hook_name}($hook_args); $output .= $display; } if ($different_shop) { $context->shop = $old_shop; $context->shop->setContext($old_context, $shop->id); } return $output; // Return html string } Attached leomanagewidget.php file Any help? sorry for language! Thanks! leomanagewidgets.php Link to comment Share on other sites More sharing options...
Centaure Posted March 2, 2020 Share Posted March 2, 2020 Bonjour je viens d'avoir ce soucis sans comprendre pourquoi d'un coup ça bug alors que tout fonctionnait parfaitement et que rien n'a changé ... j'ai commenté les deux lignes //if ($use_push && !$moduleInstance->allow_push) // continue; et ça refonctionne ... quelqu'un sais pourquoi et comment résoudre vraiment le soucis ? Link to comment Share on other sites More sharing options...
Jtoub Posted July 9, 2020 Share Posted July 9, 2020 On 3/2/2020 at 12:09 PM, Centaure said: Bonjour, Je relance comme Centaure, quelqu'un a-t-il une solution pour résoudre vraiment le soucis ? 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