Make WordPress Core


Ignore:
Timestamp:
04/15/2020 11:52:38 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Code Modernization: Remove conditional use of stream_get_contents() PHP function.

The function was introduced in PHP 5.0.0. Now that the minimum version of PHP required by WordPress is 5.6.20, these conditions are no longer needed.

Props jrf.
Fixes #48091.

File:
1 edited

Legend:

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

    r47550 r47584  
    19251925    }
    19261926
    1927     if ( ! $method && isset( $args['connection_type'] ) && 'ssh' == $args['connection_type'] && extension_loaded( 'ssh2' ) && function_exists( 'stream_get_contents' ) ) {
     1927    if ( ! $method && isset( $args['connection_type'] ) && 'ssh' == $args['connection_type'] && extension_loaded( 'ssh2' ) ) {
    19281928        $method = 'ssh2';
    19291929    }
     
    21092109        $types['ftps'] = __( 'FTPS (SSL)' );
    21102110    }
    2111     if ( extension_loaded( 'ssh2' ) && function_exists( 'stream_get_contents' ) ) {
     2111    if ( extension_loaded( 'ssh2' ) ) {
    21122112        $types['ssh'] = __( 'SSH2' );
    21132113    }
Note: See TracChangeset for help on using the changeset viewer.