Skip to:
Content

BuddyPress.org

Opened 6 months ago

Closed 6 months ago

#8432 closed defect (bug) (fixed)

PHPUnit tests about media in WP Trunk (5.7 dev cycle)

Reported by: imath Owned by: imath
Milestone: 7.2.0 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Cc:

Description

If you look at this log file from Travis CI, you'll see that it gets 4 errors with PHP 5.6 and WP Trunk.

If you look at this other log file from Travis CI, you'll see that it gets 1 error with PHP > 5.6 and WP Trunk.

This happens when testing against WP Trunk because of this commit. Now when you don't have the WP_RUN_CORE_TESTS constant set to true, errors about exif_read_data() and getimagesize() are not silenced anymore. I've tested defining this constant, it's worse, we get 43 failing tests.

I've been looking for an explanation about why exif_read_data() is generating an error in PHP 5.6 and not in newer PHP version. After looking for some time about it, it looks like PHP 5.6 has an unresolved bug about it :(

To fix the getimagesize() case, we simply need to put files into the /wp-uploads directory, test_extract_images_from_content_with_galleries_variant_ids() wasn't so I've edited it into the attached patch.

Attachments (1)

8432.patch (4.2 KB) - added by imath 6 months ago.

Download all attachments as: .zip

Change History (3)

@imath
6 months ago

#1 @imath
6 months ago

In 12840:

PHPUnit: fix failing tests about media

Since WP 50170 revision, errors about getimagesize() and exif_read_data() are not silenced anymore. We must now make sure to write media files where they should be for these two functions.

Tests involving exif_read_data() will be skipped from now on when testing against PHP 5.6 as no matter the image you use, you'll always get an Illegal IDF size error. It appears to be a bug with this version of PHP.

See #8432 (trunk)

#2 @imath
6 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 12841:

PHPUnit: fix failing tests about media

Since WP 50170 revision, errors about getimagesize() and exif_read_data() are not silenced anymore. We must now make sure to write media files where they should be for these two functions.

Tests involving exif_read_data() will be skipped from now on when testing against PHP 5.6 as no matter the image you use, you'll always get an Illegal IDF size error. It appears to be a bug with this version of PHP.

Fixes #8432 (7.0 branch)

Note: See TracTickets for help on using tickets.