Warning: “continue” targeting switch is equivalent to “break”. did you mean to use “continue 2” – What’s going on?

When you are using PHP 7.3, you may get a Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”. This issue appears because of a backward incompatibility with PHP 7.3 for the continue keyword in Switch statements. If you desire to address the trouble, then let’s try some solutions in the blog today. We believe that one of them may be useful for you. So, what are you waiting for? Let’s go!

How to solve the Warning: “continue” targeting switch is equivalent to “break”. did you mean to use “continue 2”

First of all, you can downgrade your PHP from 7.3 to 7.2 and check out the result.

If the issue still exists, let’s move on to the second solution. You need to go to the PHP file and find the line that contains the problem. After that, simply alter the term [continue;] to [break;]. Once doing that, the trouble has been solved, then congratulation. If not, why don’t you try the next method?

The third way you should implement is to change the term [continue;] to [continue 2;]. This option may work for some users, but not for others.

Finally, you can also ignore the warning and ensure that you turned off visible debug messages. In order to do that, simply open the wp-config.php file, then set define (‘WP_DEBUG_DISPLAY’, ‘false’); in it. Now, you just need to wait for the update of WordPress or plugins to tackle the warning.

Final thoughts

To sum up, we hope that the 4 suggested solutions today will be helpful for you. If you have more methods to deal with this issue, don’t hesitate to share them with us by leaving your comment below. Furthermore, we are offering a lot of responsive and well-performance Free WordPress Themes, let’s take a look.

4.3/5 - (6 votes)
Lt Digital Team (Content &Amp; Marketing)

Joomla! 5 update How to Upgrade Joomla! 4 to Joomla! 5? Read our blog
Happy Lunar New Year Grab 50% Off for everything on today, don't miss it. Coupon code: LUNARNEWYEAR50 Redeem Now