Make WordPress Core

Changeset 49450


Ignore:
Timestamp:
10/30/2020 02:01:33 AM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/image/functions.php

    r49025 r49450  
    2121
    2222        // Ensure no legacy / failed tests detritus.
    23         $folder = get_temp_dir() . 'wordpress-gsoc-flyer*.{jpg,pdf}';
    24 
    25         foreach ( glob( $folder, GLOB_BRACE ) as $file ) {
     23        $folder = get_temp_dir() . 'wordpress-gsoc-flyer*.*';
     24
     25        foreach ( glob( $folder ) as $file ) {
    2626            unlink( $file );
    2727        }
Note: See TracChangeset for help on using the changeset viewer.