Title: Error &#8220;Undefined array key 1&#8221; in wp-includes/media.php:71
Last modified: July 13, 2023

---

# Error “Undefined array key 1” in wp-includes/media.php:71

 *  [devsilin](https://wordpress.org/support/users/devsilin/)
 * (@devsilin)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/error-undefined-array-key-1-in-wp-includes-media-php71/)
 * We have errors on our website
   Undefined array key 0wp-includes/media.php:7795
   Plugin: _schema-and-structured-data-for-wpWarning Undefined array key 0wp-includes/
   media.php:7854 Plugin: _schema-and-structured-data-for-wpWarning Undefined array
   key 1wp-includes/media.php:7854 Plugin: _schema-and-structured-data-for-wpWarning
   Undefined array key 0wp-includes/media.php:7874 Plugin: _schema-and-structured-
   data-for-wpWarning Undefined array key 1wp-includes/media.php:7874 Plugin: _schema-
   and-structured-data-for-wpWarning Undefined array key 0wp-includes/media.php:
   7904 Plugin: _schema-and-structured-data-for-wpWarning Undefined array key 1wp-
   includes/media.php:7904 Plugin: _schema-and-structured-data-for-wpWarning Undefined
   array key 1wp-includes/media.php:7791 Plugin: _schema-and-structured-data-for-
   wpWarning Undefined array key 0wp-includes/media.php:702 Plugin: _schema-and-
   structured-data-for-wpWarning Undefined array key 1wp-includes/media.php:71We
   have a custom theme on the site. But even when we switch to the Twenty Twenty-
   One theme and upload the logo, there are still errors.I looked at your plugin
   code and found that errors are caused by this code:“$sizes = array( ‘width’ =
   > 600, ‘height’ => 60, ‘crop’ => false,); $custom_logo_id = get_theme_mod( ‘custom_logo’);
   if($custom_logo_id){$custom_logo = @wp_get_attachment_image_src( $custom_logo_id,
   $sizes);}”Now I commented out the line where you add a custom size for the logo
   and the error is gone. Could you please fix this in the plugin.
    -  This topic was modified 2 years, 11 months ago by [devsilin](https://wordpress.org/support/users/devsilin/).

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

 *  Plugin Author [Magazine3](https://wordpress.org/support/users/magazine3/)
 * (@magazine3)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/error-undefined-array-key-1-in-wp-includes-media-php71/#post-16892382)
 * Hi, We are extremely sorry for the inconvenience caused you. Can you please let
   us know if the error persists after the recent update? Can you please kindly 
   let us know the version which you are using? Also which PHP version are you using
   currently? So that we will analyze the issue and assist you accordingly to fix
   the issue.
 *  Thread Starter [devsilin](https://wordpress.org/support/users/devsilin/)
 * (@devsilin)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/error-undefined-array-key-1-in-wp-includes-media-php71/#post-16894479)
 * Yes, I updated the plugin yesterday and the problem still exists.
 * 
   Schema & Structured Data for WP & AMP Version 1.17 
 * PHP version8.0.29
 * WordPress Version 6.2.2 (is a multisite)
 *  Plugin Author [Magazine3](https://wordpress.org/support/users/magazine3/)
 * (@magazine3)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/error-undefined-array-key-1-in-wp-includes-media-php71/#post-16895032)
 * Hi, Thank you for the info. Can you please provide us with the list of active
   plugins and the theme that you ate using currently at your end? So that we will
   recreate the issue and assist you to fix the issue ASAP!
 *  Plugin Author [Magazine3](https://wordpress.org/support/users/magazine3/)
 * (@magazine3)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/error-undefined-array-key-1-in-wp-includes-media-php71/#post-16911350)
 * Hi, Can you please provide us with the list of active plugins and the theme that
   you ate using currently at your end? So that we will recreate the issue and assist
   you in fixing the issue ASAP!

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

The topic ‘Error “Undefined array key 1” in wp-includes/media.php:71’ is closed 
to new replies.

 * ![](https://ps.w.org/schema-and-structured-data-for-wp/assets/icon-256x256.png?
   rev=1922284)
 * [Schema & Structured Data for WP & AMP](https://wordpress.org/plugins/schema-and-structured-data-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/schema-and-structured-data-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/schema-and-structured-data-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/schema-and-structured-data-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/schema-and-structured-data-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/schema-and-structured-data-for-wp/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Magazine3](https://wordpress.org/support/users/magazine3/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/error-undefined-array-key-1-in-wp-includes-media-php71/#post-16911350)
 * Status: not resolved