Make WordPress Core


Ignore:
Timestamp:
07/15/2019 05:10:36 AM (6 years ago)
Author:
pento
Message:

Code Modernisation: Remove the SPL autoloader polyfill.

As of PHP 5.3, the SPL extension cannot be disabled, so we no longer need this polyfill.

The file is kept with a _deprecated_file() call, to alert any plugins or themes that may be loading it directly.

Props jrf, ayeshrajans.
See #47698, #46630.

File:
1 edited

Legend:

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

    r45636 r45637  
    450450}
    451451
    452 /**
    453  * Polyfill for the SPL autoloader. In PHP 5.2 (but not 5.3 and later), SPL can
    454  * be disabled, and PHP 7.2 raises notices if the compiler finds an __autoload()
    455  * function declaration. Function availability is checked here, and the
    456  * autoloader is included only if necessary.
    457  */
    458 if ( ! function_exists( 'spl_autoload_register' ) ) {
    459     require_once ABSPATH . WPINC . '/spl-autoload-compat.php';
    460 }
    461 
    462452if ( ! function_exists( 'is_countable' ) ) {
    463453    /**
Note: See TracChangeset for help on using the changeset viewer.