Fixed - Warning: “continue 2” targeting switch is equivalent to “break 2”. Did you mean to use “continue 3”

4
(4.5K Views)

×

Please Login or Register to process.

I am trying to install a flipmart WordPress theme and getting errors in  installing slider revolution and importing demo content. I purchased this theme from the ThemeForest website. I tried a lot to resolve this problem but got the same problem.

The errors are - 

Warning: “continue 2” targeting switch is equivalent to “break 2”. Did you mean to use “continue 3”? in C:\xampp\htdocs\mysite\wp-content\plugins\revslider\includes\operations.class.php on line 2858


Warning: “continue 2” targeting switch is equivalent to “break 2”. Did you mean to use “continue 3”? in C:\xampp\htdocs\mysite\wp-content\plugins\revslider\includes\operations.class.php on line 2862

I tried this WordPress theme on a live server or localhost xampp server but got the same errors. When I remove the slider revolution, the errors remove but I need to remove these errors. 

How to fix these slider revolution errors - 

 

asked 04 Sep 2019 in Wordpress by arnabisaha(2.1K Points)

Share

3 Answers
answered 04 Sep 2019 by shakti(9.1K Points)
4

Thanks for sharing your issue. I am here to fix it. First of all, fix these errors for localhost. 

You are getting errors on the localhost xampp server to installing slider revolution and importing demo content. You can remove these errors from the wp-config.php file. 

Follow the steps ( localhost)- 

1. First of all, go to C:\xampp\htdocs\wordpress path. 

2. Find out the wp-config.php file 

3. Edit with notepad. 

3. Now find out the code - define( 'WP_DEBUG', true );

You need to disable the WP_Debug. To disable the WP_debug, change true to false. 

define( 'WP_DEBUG', true );  to     define( 'WP_DEBUG', false );

Save your file. And try to install the theme. If the same error will occur then delete all theme data from PHPMyAdmin and install again. It will be removed.

 

Steps for  Live server - 

1. First of all, go to your public_html folder. This is known as the root folder of the website. 

2. Find the wp-confg.php file for your WordPress website. 

3. Edit wp-config.php file with live server editor. 

4. Disable the WP_Debug. Find out the code  -     define( 'WP_DEBUG', true );

5. Change define( 'WP_DEBUG', true ); to define( 'WP_DEBUG', false );

For enable WP_Debug,   define( 'WP_DEBUG', true );

for disalbe define WP_Debug define( 'WP_DEBUG', false );

You have to disble WP_debug and save the file .

It will be helpful for you. If the problem does not fix, please comment to me.


Comment
I solved these errors. Thank you for sharing this solution. I installed revslider and imported demo content. Thanks again.
commented 04 Sep 2019 by arnabisaha
Welcome, Arnabi . Feel free to ask any question.
commented 04 Sep 2019 by shakti

answered 04 Sep 2019 by vishalrana1(7.3K Points) (edited)
4

The Revslider problem is showing under the operations.class.php   file. This is Revslider operation file that handles the Revslier operations.  You are getting the warning messages 

Warning: “continue 2” targeting switch is equivalent to “break 2”. Did you mean to use “continue 3”? 

On line 2858 and on line 2862. You are getting these errors on the localhost and live server.  This is not a big deal. The errors are saying Did you mean to use “continue 3”? Have you tried to edit operations.class.php?

 

Follow the steps - 

1. First of navigate the file C:\xampp\htdocs\mysite\wp-content\plugins\revslider\includes\operations.class.PHP

2. Edit operations.class.php file of revslider. 

3. Find out the line - 

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

You will find this line on 2858

And also find another line - 

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

You will  get this line on 2862 

Slider revslier issue

Now change continue 2 to continue 3 like this - 

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

And also change - 

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

These lines will look like this.

 Fixed error revslider

Save the file. It is tested and will help you surely. 

 


Comment
Yes. It works . Thank you.
commented 04 Sep 2019 by arnabisaha

answered 04 Sep 2019 by priyasharma4005(4.1K Points)
4

I was getting these same problems on localhost. The theme slider was working well on the live server without any error but if I installed on the local server, given me these errors like this - 

Warning: "continue 2" targeting switch is equivalent to "break 2". Did you mean to use "continue 3"? in C:\xampp\htdocs\wordpress\wp-content\plugins\revslider\includes\operations.class.php on line 2858

Warning: "continue 2" targeting switch is equivalent to "break 2". Did you mean to use "continue 3"? in C:\xampp\htdocs\wordpress\wp-content\plugins\revslider\includes\operations.class.php on line 2862

I removed these errors without edit wp-config.php file. I edited operations.class.php file from revslider and changed to continue 2 to continue 3. After changed, reloaded the page and done. 

These errors were removed. 

 


Comment
Thanks for sharing your experience. I tried it and worked perfect for me.
commented 04 Sep 2019 by arnabisaha

Related Questions :-

Your Answer

You can post your answer after login..