Make WordPress Core

Changeset 55225


Ignore:
Timestamp:
02/05/2023 12:18:35 AM (18 months ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Silence Requests deprecations before preloading.

Intentional preloading of Requests 2.x classes and interfaces using their old (Requests 1.x) names should not produce deprecation notices.

This commit defines REQUESTS_SILENCE_PSR0_DEPRECATIONS as true in _preload_old_requests_classes_and_interfaces().

Follow-up to [54997], [55007], [55046].

Props costdev, afragen, jrf.
Fixes #54504.

File:
1 edited

Legend:

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

    r54997 r55225  
    16001600    global $_old_requests_files, $wp_filesystem;
    16011601
     1602    if ( ! defined( 'REQUESTS_SILENCE_PSR0_DEPRECATIONS' ) ) {
     1603        define( 'REQUESTS_SILENCE_PSR0_DEPRECATIONS', true );
     1604    }
     1605
    16021606    foreach ( $_old_requests_files as $name => $file ) {
    16031607        // Skip files that aren't interfaces or classes.
Note: See TracChangeset for help on using the changeset viewer.