mirror of
git://develop.git.wordpress.org/
synced 2025-07-12 03:06:26 +02:00
Media: fix potential error in class-avif-info.php::get_item_features().
Import upstream fix from libavifinfo, correcting a potential fatal error. Props yguyon. Fixes #60980. git-svn-id: https://develop.svn.wordpress.org/trunk@58049 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@ -175,7 +175,7 @@ class Features {
|
||||
if ( $tile->parent_item_id != $target_item_id ) {
|
||||
continue;
|
||||
}
|
||||
$status = get_item_features( $tile->tile_item_id, $tile_depth + 1 );
|
||||
$status = $this->get_item_features( $tile->tile_item_id, $tile_depth + 1 );
|
||||
if ( $status != NOT_FOUND ) {
|
||||
return $status;
|
||||
}
|
||||
|
BIN
tests/phpunit/data/images/avif-alpha-grid2x1.avif
Normal file
BIN
tests/phpunit/data/images/avif-alpha-grid2x1.avif
Normal file
Binary file not shown.
After Width: | Height: | Size: 924 B |
@ -1525,6 +1525,17 @@ class Tests_Functions extends WP_UnitTestCase {
|
||||
'mime' => 'image/avif',
|
||||
),
|
||||
),
|
||||
// Grid AVIF.
|
||||
array(
|
||||
DIR_TESTDATA . '/images/avif-alpha-grid2x1.avif',
|
||||
array(
|
||||
199,
|
||||
200,
|
||||
IMAGETYPE_AVIF,
|
||||
'width="199" height="200"',
|
||||
'mime' => 'image/avif',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
return $data;
|
||||
|
@ -447,6 +447,15 @@ class Tests_Image_Editor extends WP_Image_UnitTestCase {
|
||||
'num_channels' => 4,
|
||||
),
|
||||
),
|
||||
array(
|
||||
DIR_TESTDATA . '/images/avif-alpha-grid2x1.avif',
|
||||
array(
|
||||
'width' => 199,
|
||||
'height' => 200,
|
||||
'bit_depth' => 8,
|
||||
'num_channels' => 4,
|
||||
),
|
||||
),
|
||||
array(
|
||||
DIR_TESTDATA . '/images/colors_hdr_p3.avif',
|
||||
array(
|
||||
|
Reference in New Issue
Block a user