Continue Not In a Loop or Switch
-
Heya-
Fatal error: ‘continue’ not in the ‘loop’ or ‘switch’ context in /plugins/feed-them-social/feeds/facebook/facebook-feed-post-types.php on line 60
You’ve got a
continue
in anif
statement and while it seems to slip by just fine in PHP 5.x it still throws a warning and totally fails in PHP 7.x with a fatal error.The code is as follows:
if ($FB_Shortcode['type'] == 'albums' && !$FBalbum_cover) {
unset($post_data);
continue;
}
According to PHP specs
continue
is used within looping structures to skip the rest of the current loop iteration and continue execution at the condition evaluation and then the beginning of the next iteration.PHP 7 is clearly more strict about this. Any chance you can resolve this before the next update?
Thanks so much!
- The topic ‘Continue Not In a Loop or Switch’ is closed to new replies.