MyBB Community Forums

Full Version: error reporting: continue vs. break
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have seen this on my system, and seeing it reported elsewhere in posts here lately, seems to be more often.
And from various parts of source code. Is this an undocumented deprecation in PHP, hence being reported?

Quote:"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

Someone suggested turning off warning messages, but I'm not sure that's a good idea.

Trying to parse code to determine whether the error reporting is valid or flawed can be tricky if there are nested loops and switches.

What is your opinion?
It's a backward incompatible change in PHP 7.3: https://www.php.net/manual/en/migration7...ing-switch

There's a recent issue that has been fixed has the continue problem: https://github.com/mybb/mybb/issues/3665
In which file did you see that warning? If it's different from the file(s) involved in that issue, better post your problem in the "1.8 bugs and issues" section: https://community.mybb.com/forum-157.html
I will follow this suggestion at all such encounters. Thank you for the PHP 7.3 link.