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)
Latest posts by LT Digital Team (Content & Marketing) (see all)
Summer Sale Grab 50% Off for everything on today, don't miss it. Coupon code: SUMMER2024 Redeem Now
🎉 Black Friday & Cyber Monday sale! Grab 50% Off for everything on today, don't miss it. Coupon code: BFCM50 Redeem Now