Title: Illegal string offset &#8216;width&#8217; and &#8216;height&#8217;
Last modified: October 11, 2017

---

# Illegal string offset ‘width’ and ‘height’

 *  Resolved [afrianto](https://wordpress.org/support/users/afrianto/)
 * (@afrianto)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/illegal-string-offset-width-and-height/)
 * hello there, i have a issue
    i got Warning: Illegal string offset ‘width’ in /
   home/cardinalco/public_html/staging/wp-includes/media.php on line 988
 * Warning: Illegal string offset ‘height’ in /home/cardinalco/public_html/staging/
   wp-includes/media.php on line 989
 * i have no idea how to solved that issue.
    thank you

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [straightvisions GmbH](https://wordpress.org/support/users/matthias-reuter/)
 * (@matthias-reuter)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/illegal-string-offset-width-and-height/#post-9575600)
 * I can confirm this issue, I’ve get these notices:
 * PHP Warning: Illegal string offset ‘width’ in /wp-includes/media.php on line 
   988
    PHP Notice: Uninitialized string offset: 0 in /wp-includes/media.php on 
   line 988 PHP Warning: Illegal string offset ‘height’ in /wp-includes/media.php
   on line 989
 * Seems it occurs when using “Mega Menu Widgets” feature with image-widgets in 
   a menu.
 *  Plugin Author [megamenu](https://wordpress.org/support/users/megamenu/)
 * (@megamenu)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/illegal-string-offset-width-and-height/#post-9576031)
 * Hi both,
 * MMM does not really “mess” with how widgets are processed – it just executes 
   them using core WordPress functions. The Image Widget it a core WordPress widget
   so it should not really be throwing errors.
 * I do see one report here:
 * [https://core.trac.wordpress.org/ticket/40920](https://core.trac.wordpress.org/ticket/40920)
 * As per that ticket, are you using SVGs or “Inserting from URL”?
 * Regards,
    Tom
 *  [straightvisions GmbH](https://wordpress.org/support/users/matthias-reuter/)
 * (@matthias-reuter)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/illegal-string-offset-width-and-height/#post-9576074)
 * Hi Tom,
 * yeah, you are right, this issue occurs when using image uploaded SVGs, so no 
   bug in your plugin in my case.
 * Kind regards,
 * Matthias
 *  [straightvisions GmbH](https://wordpress.org/support/users/matthias-reuter/)
 * (@matthias-reuter)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/illegal-string-offset-width-and-height/#post-9576081)
 * Bug is confirmed on [https://wordpress.org/support/topic/illegal-string-offset-warning-for-height-and-width/](https://wordpress.org/support/topic/illegal-string-offset-warning-for-height-and-width/)
 *  Thread Starter [afrianto](https://wordpress.org/support/users/afrianto/)
 * (@afrianto)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/illegal-string-offset-width-and-height/#post-9577697)
 * hi guys.
 * Yes i’m uploading image witg SVG format.
    thanks for replying, now i see where
   the issue is.
 * your plugin is clear.
    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Illegal string offset ‘width’ and ‘height’’ is closed to new replies.

 * ![](https://ps.w.org/megamenu/assets/icon-128x128.png?rev=1489843)
 * [Max Mega Menu](https://wordpress.org/plugins/megamenu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/megamenu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/megamenu/)
 * [Active Topics](https://wordpress.org/support/plugin/megamenu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/megamenu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/megamenu/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [afrianto](https://wordpress.org/support/users/afrianto/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/illegal-string-offset-width-and-height/#post-9577697)
 * Status: resolved