You think you did nothing on your WordPress website and suddenly you got such error?
Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in /…/wp-includes/pomo/plural-forms.php on line 210
Warning: Cannot modify header information – headers already sent by (output started at /…/wp-includes/pomo/plural-forms.php:210) in /…/wp-includes/pluggable.php on line 1216
You are not alone. I got such error myself on blogs I didn’t touch for years.
It took me awhile to find a solution, but at last I found it and I want to share my findings. Hopefully it will be helpful for you too.
I will list other solutions I found online which didn’t help me, but may be will be useful to others.
What didn’t work
- The first suggestion I found by googling this error message was to replace corrupted source files. I.e. download fresh WordPress setup files and replace my installation except wp-content folder and wp-config.php file. I tried it, but it didn’t help at all.
- The second solution was to edit function.php file. I definitely didn’t want to go this way and edit WP core files. So I was looking for other solution.
What did work
After some intensive search I read one recommendation regarding downgrading PHP version on server hosting WordPress site. When I saw that comment I remembered. Last year the only thing I did for that site was upgrading PHP to the latest version 7.3. This was recommended by WordPress requirements.
I did follow these recommendations and updated PHP to 7.3 for all my websites in bulk . Because I did it in bulk I didn’t check all my sites. My bad.
So I had combination of PHP 7.3 and WP 4.9.3 which didn’t work. I needed to reverse it back with hope it will work. 7.1 was the lowest PHP version available on my web host. I didn’t have other choice but to choose it. It worked! I could login to my WP admin panel. The first thing I did – upgraded WordPress version from 4.9.3 to 5.2.3.
After WP upgrade I switched again PHP version to the latest available v7.3. Checked my website and it still was fine.
I can not guarantee it will work for everybody, but these are the steps I took to fix an error on my sites:
- Downgrade PHP version at your web hosting.
- Login into your WordPress admin dashboard
- Upgrade WordPress version to the latest available
- Switch PHP version to the highest available
I hope it will help to solve your problem. Please comment bellow if this solution was helpful and tell us which WP and PHP versions were causing a problem.