Skip to:

Opened 2 years ago

Closed 2 years ago

Last modified 21 months ago

#6868 closed defect (bug) (fixed)

BP_Attachment::get_image_data() unit test is failing due to upstream change

Reported by: imath Owned by: imath
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.4.0
Component: Media Keywords: has-patch commit


Just in case, i've posted a ticket on Core Trac:

I've tested and the upstream change is only impacting the unit test because i was using === and the type of the orientation metadata is now a string.

But when an image is upside down, the BP_Attachment::edit_image() is still rotating the image. So we can probably fix the unit test...

Attachments (1)

6868.patch (638 bytes) - added by imath 2 years ago.

Download all attachments as: .zip

Change History (5)

2 years ago

This ticket was mentioned in Slack in #buddypress by imath. View the logs.

2 years ago

#2 @imath
2 years ago

  • Keywords commit added
  • Milestone changed from Under Consideration to 2.5

Let's fix the test.

#3 @imath
2 years ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 10502:

Fix the unit test about BP_Attachment::get_image_data()

WordPress changed the type of the "Orientation" image metadata from an integer to a string. As we were using a strict comparison inside the unit test, it was failing.

Fixes #6868

#4 @Paul Gibbs
21 months ago

  • Component changed from API - Avatars to Media
Note: See TracTickets for help on using tickets.