[Resolved] Warning: Illegal string offset

  • Hi,
    After update to WordPress 3.7 i find this message only in one page of my site:

    Warning: Illegal string offset ‘width’ in /home/xxxx/cruzgloriosa.org/wp-content/plugins/nextgen-facebook/lib/media.php on line 170

    Warning: Illegal string offset ‘height’ in /home/xxxx/cruzgloriosa.org/wp-content/plugins/nextgen-facebook/lib/media.php on line 170

    Warning: Illegal string offset ‘width’ in /home/xxxx/cruzgloriosa.org/wp-content/plugins/nextgen-facebook/lib/media.php on line 172

    Warning: Illegal string offset ‘height’ in /home/xxxx/cruzgloriosa.org/wp-content/plugins/nextgen-facebook/lib/media.php on line 172

    The page is: http://www.cruzgloriosa.org/cantos-camino-neocatecumenal-pages/

    Any suggestion? Thank you for your help.


Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author JS Morisset


    Hm. It would appear that wp_get_attachment_metadata() is not returning the original image width and height, as it should.

    Would you mind turning on debug mode (Open Graph+ Advanced settings page)? That will tell me for sure. 😉




    Thank you for reponse… I checked Add Hidden Debug Info… It’s that?

    Plugin Author JS Morisset


    Yup, it’s as I suspected. For some reason, the WordPress image_downsize() function is returning an image size of 1×1 for the ngfb-open-graph size for http://www.cruzgloriosa.org/wp-content/uploads/2013/09/Cantos-Camino-Neocatecumenal-pages.png.

    Since 1×1 is smaller than it should be, the plugin attempts to get the original image information with wp_get_attachment_metadata(). Here again there seems to be an issue because the returned with and height is missing.

    I suspect your theme or another plugin has a broken image filter. Maybe image_downsize, editor_max_image_size, image_resize_dimensions…

    There’s nothing I can do to fix this, but you could avoid triggering this problem by unckecking the “WP Auto-Resize” option (Open Graph+ General settings page). That will prevent the plugin from checking the image size.


    Hi JS,

    I unchecked WP Auto-Resize and the problem is solved.

    You think i will not have problem after?

    And… why only this specific page?

    Thank you very much.

    Plugin Author JS Morisset


    As I said, some other plugin and/or theme probably has an image related filter hooked into WordPress, and this filter code is broken.

    By unchecking that option, NGFB Open Graph+ will not validate the image sizes that WordPress returns, so will not trigger the problem. To fix the issue, you’d have to fix that filter. I can’t tell you why the issue is only on that page – I don’t know what that broken filter does, I can only see it’s effect on the WordPress functions.

    This could also be a WordPress bug, but more likely would be a broken filter. You could try disabling image related plugins and see if the problem goes away. At least then you’d know which plugin was causing the issue. If it’s not a plugin, then it might be your theme.



    I don’t have image related plugins.

    I have plugins as Download-Monitor, Newsletter, Askimet, DBManager, TablePress, Soundcloud…

    I think… a bug of WordPress 3.7?

    Plugin Author JS Morisset


    I would be surprised, but possible I guess.

    The metadata for that image might be corrupt. You could try running something like this http://wordpress.org/plugins/regenerate-thumbnails/ and see if that fixes it.

    This one is also very good http://wordpress.org/plugins/simple-image-sizes/, though the UI buttons need a little work. 😉

    It really looks like a broken filter though, so I’d try disabling all plugins and see if the problem goes away — then re-enable one by one and see when it comes back. 😉



    I think the problem is with Tablepress plugin, i deactivated this and no error… Now i have the error message, but only any times…

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] Warning: Illegal string offset’ is closed to new replies.
Skip to toolbar