Title: Fatal error: Uncaught TypeError
Last modified: June 10, 2024

---

# Fatal error: Uncaught TypeError

 *  [cfm168](https://wordpress.org/support/users/cfm168/)
 * (@cfm168)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-35/)
 * Hello,
 * I have WP 6.5.4, WooCommerce 8.9.2. and running PHP 8.1. Today I get this Fatal
   error log as follow:
 * Jun 09, 21:20:07
   Warning: Undefined array key “width” in /home/SorryHidedmysite/
   SorryHidedmysite.com/wp-content/themes/twentyeleven/image.php on line 39
 * Jun 09, 21:20:07
   Warning: Undefined array key “height” in /home/SorryHidedmysite/
   SorryHidedmysite.com/wp-content/themes/twentyeleven/image.php on line 40
 * Stack Trace
   Fatal error: Uncaught TypeError: Cannot access offset of type string
   on string in /home/SorryHidedmysite/SorryHidedmysite.com/wp-includes/media.php:
   795
    1. 
       image_get_intermediate_size(325, Array)/home/SorryHidedmysite/SorryHidedmysite.
       com/wp-includes/media.php:236
    2. 
       image_downsize(325, Array)/home/SorryHidedmysite/SorryHidedmysite.com/wp-includes/
       media.php:970
    3. 
       wp_get_attachment_image_src(325, Array, false)/home/SorryHidedmysite/SorryHidedmysite.
       com/wp-includes/media.php:1060
    4. 
       wp_get_attachment_image(325, Array)/home/SorryHidedmysite/SorryHidedmysite.
       com/wp-content/themes/twentyeleven/image.php:104
    5. 
       include(‘/home/mysite…’)/home/SorryHidedmysite/SorryHidedmysite.com/wp-includes/
       template-loader.php:106
    6. 
       require_once(‘/home/mysite…’)/home/SorryHidedmysite/SorryHidedmysite.com/wp-
       blog-header.php:19
    7. 
       require(‘/home/mysite…’)/home/SorryHidedmysite/SorryHidedmysite.com/index.php:
       17
    8. 
       {main}thrown in /home/SorryHidedmysite/SorryHidedmysite.com/wp-includes/media.
       php on line 795
 * Please advise how to fix this issue. Hope you have a new update soon to fix this
   issue.
 * Thanks in advance!

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

 *  Moderator [jordesign](https://wordpress.org/support/users/jordesign/)
 * (@jordesign)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-35/#post-17815637)
 * Hi [@cfm168](https://wordpress.org/support/users/cfm168/) could you please check
   for me if this error still occurs when you have no plugins activated on the site?
 *  Thread Starter [cfm168](https://wordpress.org/support/users/cfm168/)
 * (@cfm168)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-35/#post-17844701)
 * Hi [@jordesign](https://wordpress.org/support/users/jordesign/),
 * Yes I tested and deactivated all plugins on the site, waited for a couple of 
   days and check back, the same issue persists. Please help. Thanks in advance!
 *  Moderator [jordesign](https://wordpress.org/support/users/jordesign/)
 * (@jordesign)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-35/#post-17855267)
 * Hi [@cfm168](https://wordpress.org/support/users/cfm168/) – one thing else to
   try please… Could you please edit the page in question and make sure that all
   images within the page have a width set for them?
 *  Thread Starter [cfm168](https://wordpress.org/support/users/cfm168/)
 * (@cfm168)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-35/#post-17855302)
 * Hello Sir [@jordesign](https://wordpress.org/support/users/jordesign/),
 * What do you mean “edit the page in question”? Which page?
 *  Thread Starter [cfm168](https://wordpress.org/support/users/cfm168/)
 * (@cfm168)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-35/#post-17859322)
 * Hello,
 * Which file for the front page? I try to add image’s wide and high (width=”190″
   height=”67″) in the elements. I can’t find the file to edit. Please advise. Thanks
   in advance!
 *  Moderator [jordesign](https://wordpress.org/support/users/jordesign/)
 * (@jordesign)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-35/#post-17859507)
 * Hi [@cfm168](https://wordpress.org/support/users/cfm168/) – that warning will
   be appearing in the logs because of an image that is inserted in the content 
   of one of your pages that doesn’t have a width.
 * You’d need to check the images in each of your pages and/or posts. Another way
   would be to [turn on Debugging](https://learn.wordpress.org/tutorial/debugging-in-wordpress/)
   and you’d be able to see which page the warning appears on.
 * But also – for what it is worth – as that is only a warning, and it is related
   to content in the site – it’s something you _could_ choose to ignore.
 *  Thread Starter [cfm168](https://wordpress.org/support/users/cfm168/)
 * (@cfm168)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-35/#post-17862089)
 * Hi [@jordesign](https://wordpress.org/support/users/jordesign/),
 * Which file name I can edit the code for the site’s logo on top front page? It
   seems missing width and height px.
 *  Moderator [jordesign](https://wordpress.org/support/users/jordesign/)
 * (@jordesign)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-35/#post-17870017)
 * Hi [@cfm168](https://wordpress.org/support/users/cfm168/) thanks for narrowing
   it down to that file. If you re-upload your site logo in the Customizer – do 
   you find that makes a difference to the error?
 * [https://wordpress.org/documentation/article/customizer/#site-identity](https://wordpress.org/documentation/article/customizer/#site-identity)

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

The topic ‘Fatal error: Uncaught TypeError’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/twentyeleven/5.1/screenshot.png)
 * Twenty Eleven
 * [Support Threads](https://wordpress.org/support/theme/twentyeleven/)
 * [Active Topics](https://wordpress.org/support/theme/twentyeleven/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/twentyeleven/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/twentyeleven/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [jordesign](https://wordpress.org/support/users/jordesign/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-typeerror-35/#post-17870017)
 * Status: not resolved