Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#51661 closed defect (bug) (fixed)

Remove GLOB_BRACE from unittest functions.

Reported by: amykamala's profile amykamala Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.6 Priority: normal
Severity: normal Version:
Component: Media Keywords: needs-patch
Focuses: Cc:


[ from @sawanoboly ]

"One of the unit tests uses the GLOB_BRACE option for glob.

The GLOB_BRACE option is not supported by some libc-compatible implementations. Solaris is shown as an example in the documentation, but it cannot use this option on other implementations, such as alpine linux, which uses musl-libc.

I'd like to see them switch to an implementation that doesn't use GLOB_BRACE, as it seems to be just cleaning up the files, regardless of compatibility."

Change History (3)

#1 @SergeyBiryukov
3 years ago

  • Milestone changed from Awaiting Review to 5.6
  • Owner set to SergeyBiryukov
  • Status changed from new to accepted

This ticket was mentioned in Slack in #core-media by antpb. View the logs.

3 years ago

#3 @SergeyBiryukov
3 years ago

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

In 49450:

Tests: Remove the GLOB_BRACE flag for glob() function from unit tests.

The flag was previously used in PDF preview tests when cleaning up temporary files.

As noted in the PHP documentation, the flag is not available on some non-GNU systems, like Solaris or Alpine Linux.

Follow-up to [40130].

Props amykamala, sawanoboly.
Fixes #51661.

Note: See TracTickets for help on using tickets.