Support » Fixing WordPress » Illegal String Offset

  • Resolved bobkesh

    (@bobkesh)


    Hi,

    This warning came up on the bottom of one of my pages. I’m a wpbeginner & not sure why it is illegal or how to fix it. I’ve made no changes to the image.php in my wordpress theme. Here is the warning:

    Warning: Illegal string offset ‘width’ in /home/robaid/kerosenechronicle.com/wp-content/themes/nishita-wpcom/image.php on line 56

    Warning: Illegal string offset ‘height’ in /home/robaid/kerosenechronicle.com/wp-content/themes/nishita-wpcom/image.php on line 57

    Here is the code I in the image.php file that the illegal string refers to:

    $metadata[‘width’],
    $metadata[‘height’],

    Can someone please help?

    The blog I need help with is http://www.kerosenechronicle.com.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Looks like a problem with the theme. You should probably ask about this in the theme’s forum. It looks like it hasn’t been updated for a long time though, so if you can’t get any help with it, maybe it’s time to browse for a new theme. Themes need to keep up with changes that come with WP updates and when they don’t, sometimes they break or become security risks.

    One thing you could try is to disable your plugins to see if one of them is interfering with the theme.

    Thread Starter bobkesh

    (@bobkesh)

    Thanks Bill. I’ll keep trying to edit it into use, but if I can’t I’ll browse for a better theme.

    Incidentally, I did fix the problem. I moved to wordpress.org recently and all the posts have been republished with no time of publication. I republished the post that showed the error and it was corrected. This is most likely just a temporary fix, in the larger problem of a not updated theme.

    That’s great. I’m glad you got it working again. Sometimes an older theme can keep chugging along fine for quite a while. Personally I don’t like leaving potential security holes open, but that doesn’t mean your theme has any such thing. It’s just something better dealt with sooner rather than when it’s too late.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Illegal String Offset’ is closed to new replies.