Make WordPress Core


Ignore:
Timestamp:
05/01/2020 07:05:04 PM (6 years ago)
Author:
desrosj
Message:

General: Fix various issues flagged by the PHPCompatibilityWP PHPCS ruleset.

As part of the continued effort to improve PHP compatibility, the following improvments are being made:

  • Removing deprecated PHP safe_mode checks not found in bundled external libraries.
  • Change the remaining while loops using each() to foreach loops.
  • Prevent false positives from being flagged for the sodium_compat library being caused by loading this in a non-standard way.
  • Add inline comments to not flag deprecated PHP directives in the getID3 library.

Props desrosj, earnjam, dryanpress.
See #49922.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/schema.php

    r47597 r47735  
    370370        do_action( 'populate_options' );
    371371
    372         if ( ini_get( 'safe_mode' ) ) {
    373                 // Safe mode can break mkdir() so use a flat structure by default.
    374                 $uploads_use_yearmonth_folders = 0;
    375         } else {
    376                 $uploads_use_yearmonth_folders = 1;
    377         }
    378 
    379372        // If WP_DEFAULT_THEME doesn't exist, fall back to the latest core default theme.
    380373        $stylesheet = WP_DEFAULT_THEME;
     
    467460
    468461                // 2.0.1
    469                 'uploads_use_yearmonth_folders'   => $uploads_use_yearmonth_folders,
     462                'uploads_use_yearmonth_folders'   => 1,
    470463                'upload_path'                     => '',
    471464
Note: See TracChangeset for help on using the changeset viewer.