I'm getting the following fatal error when trying to load EE 2.11.2 with ChannelImages 5.4.19 under PHP 7/7.1:

Fatal error: 'continue' not in the 'loop' or 'switch' context in /home/omart/public_html/system/expressionengine/third_party/channel_images/libraries/image_helper.php on line 913

Here is the code snippet in question. Line is 913 is the last if statement:

        // Channel?
        if (strpos($param_channel, '|') !== FALSE)
            $channel_id = array();
            $temp = explode('|', $param_channel);

            foreach($temp as $item)
                if (isset($channels[$item]) == FALSE) continue;
                $channel_id[] = $channels[$item];

            return $channel_id;
            if (isset($channels[$param_channel]) == FALSE) continue;
            else return $channels[$param_channel];

1 Answer 1


Replace code continue; with return false; statement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.