WordPress: Upgrade to PHP 7.3 and get an error “continue” targeting switch is equivalent to “break”.

Published on:
Last updated:

This post is also available in: 日本語 (Japanese)

After upgrading to PHP7.3, Jetpack related errors like the following appear momentarily when the page loads.
As a notebook, I write down how to deal with it.

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in .../wp-content/plugins/jetpack/_inc/lib/class.media-summary.php on line 77
Warning: "continue" targeting switch is equivalent to "break";. Did you mean to use "continue 2"? in .../wp-content/plugins/jetpack/_inc/lib/class.media-summary.php on line 87

The cause seems to be that using an older version of Jetpack.

So, the workaround is to upgrade the Jetpack version, but in some cases you may need to upgrade WordPress first.
If you can't upgrade the WordPress version by all means, you can stop the Jetpack plugin and the error will disappear.

About
Kuniyoshi Takemoto is the founder of Amelt.net LLC, and editor of this blog(www.amelt.net).Learn more and follow me on LinkedIn.