I'm getting this error when trying to upload an image with ChannelImages 5.4.19 with EE 2.11.7:

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

The offending code is below. Line 2442 is the line with continue;.

if ($field_type == 'file') {
        $img_path = str_replace($file_dirs_search, $file_dirs_replace, $field_data);

        if (file_exists($img_path) == FALSE) {

        $img = array();
        $img['path'] = $img_path;
        $images[] = $img;

Any help is appreciated.



1 Answer 1


Replace the continue with return statement.

  • That was the first thing I tried, and it resulted in a slew of additional PHP errors.
    – Ty Morton
    Apr 11, 2017 at 20:01
  • 1
    Actually, it turns out that the resulting errors are from the same issue just further down the PHP code.
    – Ty Morton
    Apr 11, 2017 at 21:27

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.