mathdex Posted February 15, 2019 Share Posted February 15, 2019 (edited) Hello everyone, I'm very new to PrestaShop and I can't seem to activate debug mode (I'm running version 1.7.5). I run PrestaShop locally on xampp. I've tried this already: Turn on "Debug mode" in the back office under "Performances" Changing the '_PS_MODE_DEV_' putting it to true manually in the defines.inc.php file Running an older version of php (currently on 7.3.1) in xampp ... Once debug mode is enabled, I always get this error: ContextErrorException Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? I'm sorry if this is an obvious mistake but I just can't find what I'm doing wrong. Thanks in advance for your responses ! Edited February 17, 2019 by mathdex (see edit history) Link to comment Share on other sites More sharing options...
tdsoft Posted February 15, 2019 Share Posted February 15, 2019 I think you have just upgraded your PHP version to 7.3 Please use a statable PHP versions, 5.6 is good ! 1 Link to comment Share on other sites More sharing options...
mathdex Posted February 15, 2019 Author Share Posted February 15, 2019 (edited) Thanks for your reply I thought it might be that. Something must have gone wrong when I tried to configure xampp with php 5.6. Is it good enough if I install xampp again, this time with php 5.6 running ? Edited February 15, 2019 by mathdex (see edit history) Link to comment Share on other sites More sharing options...
JBW Posted February 17, 2019 Share Posted February 17, 2019 You can install several XAMPP versions in parallel. I do so for testing purposes (PHP 5.6 & PHP 7.2). 1 Link to comment Share on other sites More sharing options...
Maneesh Posted February 26, 2020 Share Posted February 26, 2020 Just read the error and change it as suggested by the error message. For example I changed return; to return 2; in 2 places of file UnitOfWork.php (this class is used in ORM of Doctrine). Issue resolved. Best Regards Maneesh Tiwari Link to comment Share on other sites More sharing options...
mikhsanh Posted March 28, 2020 Share Posted March 28, 2020 On 2/26/2020 at 3:08 PM, Maneesh said: Just read the error and change it as suggested by the error message. For example I changed return; to return 2; in 2 places of file UnitOfWork.php (this class is used in ORM of Doctrine). Issue resolved. Best Regards Maneesh Tiwari Thanks Maneesh its worked for me Link to comment Share on other sites More sharing options...
cristic Posted April 16, 2020 Share Posted April 16, 2020 On 2/26/2020 at 10:08 AM, Maneesh said: Just read the error and change it as suggested by the error message. For example I changed return; to return 2; in 2 places of file UnitOfWork.php (this class is used in ORM of Doctrine). Issue resolved. Best Regards Maneesh Tiwari No, you should NEVER modify core files @Maneesh. Using ‘continue 2’ is very different than using ‘continue’. If it was coded using continue, it should be left as continue until the developer decides what it should actually be changed to – it could be ‘break’ or it could be ‘continue 2’. If you get the wrong one, the logic will change and the site could break in unexpected ways. See here: https://github.com/PrestaShop/PrestaShop/issues/14893 PrestaShop 1.7.0 to 1.7.3 is compatible with PHP 7.1 and PrestaShop 1.7.4 & 1.7.5 & 1.7.6 are compatible with PHP 7.2. Next Major release PS1.7.7 will be compatible with PHP7.3 Link to comment Share on other sites More sharing options...
ilclaudio Posted April 20, 2020 Share Posted April 20, 2020 Hi, I had the same problem on the hosting of my Service Provider. I had Prestashop 1.7.6.1 and PHP 7.3. I have solved downgrading PHP to the version 7.2, I did it from the Control Panel of the Service Provider. I don't know who canged the version of PHP on the hosting, I think the Service Provider. cld Link to comment Share on other sites More sharing options...
mykiki_1 Posted April 30, 2020 Share Posted April 30, 2020 On 20/04/2020 at 11:12, ilclaudio said: Salut, J'ai eu le même problème sur l'hébergement de mon fournisseur de services. J'avais Prestashop 1.7.6.1 et PHP 7.3. J'ai résolu de rétrograder PHP vers la version 7.2, je l'ai fait à partir du panneau de configuration du fournisseur de services. Je ne sais pas qui a falsifié la version de PHP sur l'hébergement, je pense que le fournisseur de services. cld Alors moi j'ai un souci lorsque je passe en 7.3 j'ai effectivmeent ce message d'erreur, mais quand je revien en version 7.2 si je ne suis pas en mode debug alors uniquement mon back office affiche une page blanche .... et lorsque j'active le debug le BO reviens par contre pb je ne peu pas installer de plugin ... lol je deviens fous avec ce pb Link to comment Share on other sites More sharing options...
Yulia Vitun Posted September 1, 2022 Share Posted September 1, 2022 I am on PS 1.7.6.5 + PHP 7.3 = get a similar error too. on my server no (easy) way to install 7.2, so -> Solution: to add two "2" in lines 2636 & 2665 of .../vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php // use the entity association if (isset($data[$field]) && is_object($data[$field]) && isset($this->entityStates[spl_object_hash($data[$field])])) { $class->reflFields[$field]->setValue($entity, $data[$field]); $this->originalEntityData[$oid][$field] = $data[$field]; continue 2; } // use the entity association if (isset($data[$field]) && is_object($data[$field]) && isset($this->entityStates[spl_object_hash($data[$field])])) { $class->reflFields[$field]->setValue($entity, $data[$field]); $this->originalEntityData[$oid][$field] = $data[$field]; continue 2; } // Foreign key is NULL $class->reflFields[$field]->setValue($entity, null); $this->originalEntityData[$oid][$field] = null; continue 2; 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