Skip Navigation

[Resolved] E_WARNING: "continue" targeting switch is equivalent to "break".

This support ticket is created 5 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Levy 5 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#1355823

I am trying to:

Upgrade our server to PHP 7.3

------------

Link to a page where the issue can be seen:

We have warnings suppressed so you can't see this issue.

------------

I expected to see:

Clean error log.

------------

Instead, I got:

Error message

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

Notes:

I'd expect to see this warning when there's a switch statement inside a foreach loop, but didn't see an obvious one inside of wpcf_embedded_init so not sure where this is truly being thrown.

I've provided the stack trace from New Relic above.

#1355827

Can we please make this thread private? Didn't realize these were on public URLs.

#1355893

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Levy,

Thank you for getting in touch.

This occurred after updating the 7.3 ?

From the logs you've sent me i'm not seeing any reference to our Toolset plugins. Not sure how we will begin to debug this one but it just seems to be a warning and shouldn't affect the sites functionality

I've also removed the stack trace from your initial post.

Thanks,
Shane

#1355935

This occurred after updating the 7.3 ?

Yes.

From the logs you've sent me i'm not seeing any reference to our Toolset plugins.

The stack trace referenced "wpcf_embedded_init" as the last spot that was causing the error which is part of the Toolset plugins.

it just seems to be a warning and shouldn't affect the sites functionality

Also understood that it's a warning, but would still like for it not to be there 🙂

Not sure how we will begin to debug this one

Basically would need to look for a switch statement inside of a foreach loop that uses "continue"

#1355959

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Levy,

Thanks for sharing but the warning makes no reference to our toolset plugins so if you're able to send me a trace to where this file is.

Secondly I may need a copy of your site if im not able to replicate the warning.

Thanks,
Shane

#1355963

Welp, I searched the entire toolset codebase and couldn't find a continue targeting switch in there so closing this one up for now. Still not sure from where that warning is triggered though.