( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in sites/all/modules/video/libraries/phpvideotoolkit/phpvideotoolkit.php5.php on line 2122

That line contains continue 1;. It's inside a switch (obviously) which is inside a for loop. It's not immediately obvious to me whether break or continue 2 is appropriate.

CommentFileSizeAuthor
#2 continue_in_switch-3042169-2.patch538 bytessivaprasadc

Comments

jacob.embree created an issue. See original summary.

sivaprasadc’s picture

Status: Active » Needs review
StatusFileSize
new538 bytes

Hi,

As per the documentation, I have created patch. I have applied in my code, it resolved the warning.

PFA patch file and Kindly review the same.

joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for the patch, it totally fixes the issue. I was able to reproduce by going to the status page.

  • poker10 committed f6fb9ce4 on 7.x-2.x authored by SivaprasadC
    Issue #3042169 by SivaprasadC: continue in switch in phpvideotoolkit
    
poker10’s picture

Status: Reviewed & tested by the community » Fixed

I think the patch is correct with continue 2, as it should be the case when no appropriate extension is found. Then the code should continue with the next file in the foreach look (and skip the current one). It does not make sense to continue with the current file without the $image set.

Committed. Thanks all!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.