ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Fatal error: Call to undefined function img()

November 09, 2011 6:04pm

Subscribe [2]
  • #1 / Nov 09, 2011 6:04pm

    neuralynx

    62 posts

    I upgraded from 2.2.2 to 2.3.1.  When I try to publish new content from the CP, I now get the error:

    Fatal error: Call to undefined function img() in system/expressionengine/fieldtypes/file/ft.file.php on line 202

    The code in question is:

    $thumb = img(array(
        'src' => $thumb_info['thumb'],
        'alt' => $filename
    ));

    I upgraded following the instructions exactly as listed in http://ellislab.com/expressionengine/user-guide/installation/update.html

  • #2 / Nov 09, 2011 6:19pm

    neuralynx

    62 posts

    Sorry I jumped to post before doing a little investigation.  I looked in my backup for the ‘function img’ and found it in ‘system/codeigniter/system/helpers/html_helper.php’

    Somehow, that one file didn’t transfer properly, since it was a zero-length file on my upgraded system.  I re-uploaded just that helper file, and things appear to work now.

    Sorry for opening this thread, but it does highlight the need for a better upgrade system.  This has probably been talked about before, and I’ll look for it in the Feature Requests forum.

  • #3 / Nov 09, 2011 9:26pm

    Sue Crocker

    26054 posts

    Glad you were able to figure out what the problem was. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases