[wp-trac] [WordPress Trac] #61060: PHP Warning: Undefined array key 1 in /chroot/home/ab2bb14c/fullerfasteners.com/html/wp-includes/media.php on line 71
WordPress Trac
noreply at wordpress.org
Tue Apr 23 16:25:41 UTC 2024
#61060: PHP Warning: Undefined array key 1 in
/chroot/home/ab2bb14c/fullerfasteners.com/html/wp-includes/media.php on
line 71
--------------------------+-----------------------------
Reporter: fullermetric | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 6.5
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Running PHP 8.1, WordPress 6.5.2, debug.log reports Undefined array key 1
in /chroot/home/ab2bb14c/fullerfasteners.com/html/wp-includes/media.php on
line 71
{{{
function image_constrain_size_for_editor( $width, $height, $size =
'medium', $context = null ) {
global $content_width;
$_wp_additional_image_sizes = wp_get_additional_image_sizes();
if ( ! $context ) {
$context = is_admin() ? 'edit' : 'display';
}
if ( is_array( $size ) ) {
$max_width = $size[0];
$max_height = $size[1];
}}}
Line 71 is where $max_height is set, but $size[1] is undefined.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61060>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list