Warning: "continue" targeting switch is equivalent to "break"

Viewed 6835

Hello i have a problem with my [website]1 here is the error :

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/enghouse/dakatherm-ks.com/wp-content/plugins/revslider/includes/operations.class.php on line 2695

2 Answers

Your version of the revslider plugin seems to have a compatibility issue with your current version of PHP. If this plugin is discontinued and you want to fix this by hand, you can change the continue to continue 2. If you want to know more, refer to the PHP documentation (read the Note: part): https://www.php.net/manual/en/control-structures.continue.php

Edit your /wp-content/plugins/revslider/includes/operations.class.php and search for:

if(!isset($layer['video_data']->id) || empty($layer['video_data']->id)) continue;

Change the first instance to:

if(!isset($layer['video_data']->id) || empty($layer['video_data']->id)) continue 2;

And the second instance to:

if(!isset($layer['video_data']->id) || empty($layer['video_data']->id)) continue 3;

There will be another warning that will also appear after fixing these two. Open /wp-content/plugins/revslider/includes/output.class.php and search for:

case 'none':

Change the line following from:

continue;

to

continue 2;

Save both files and reload. The warnings should be gone up to PHP 7.4. Upgrading to PHP 8.0 will cause serious errors and blow up your site (including access to Dashboard panel), which I can only guess will require updating revslider plugin.

Related