Make WordPress Core


Ignore:
Timestamp:
06/03/2020 05:38:56 PM (5 years ago)
Author:
desrosj
Message:

General: Continuing to work towards a passing PHP Compatibility scan.

This is a final pass to fix PHP compatibiilty issues in the codebase with code changes or adding phpcs:ignore comments.

With this change, all PHP compatibility warnings and errors without specific tickets have been addressed (see #49810 and #41750).

Props desrosj, johnbillion, jrf.
See #49922.

File:
1 edited

Legend:

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

    r46661 r47902  
    188188        // Don't search for a transport if it's already been done for these $capabilities
    189189        if (isset(self::$transport[$cap_string]) && self::$transport[$cap_string] !== null) {
    190             return new self::$transport[$cap_string]();
     190            $class = self::$transport[$cap_string];
     191            return new $class();
    191192        }
    192193        // @codeCoverageIgnoreEnd
     
    215216        }
    216217
    217         return new self::$transport[$cap_string]();
     218        $class = self::$transport[$cap_string];
     219        return new $class();
    218220    }
    219221
Note: See TracChangeset for help on using the changeset viewer.