Make WordPress Core


Ignore:
Timestamp:
08/26/2016 06:46:17 PM (10 years ago)
Author:
wonderboymusic
Message:

FTP: ensure that there is only one class named ftp, which is what is expected in the loading of this arcane library. This ensures that an autoload generator, something along the lines of Composer, won't hiccup when it gets to these files.

See #36335.

File:
1 edited

Legend:

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

    r35946 r38380  
    819819                $sensitive=(PHP_OS!='WIN32');
    820820                return ($sensitive?
    821                         preg_match( '/' . preg_quote( $pattern, '/' ) . '/', $probe ) : 
     821                        preg_match( '/' . preg_quote( $pattern, '/' ) . '/', $probe ) :
    822822                        preg_match( '/' . preg_quote( $pattern, '/' ) . '/i', $probe )
    823823                );
     
    905905
    906906require_once dirname( __FILE__ ) . "/class-ftp-" . ( $mod_sockets ? "sockets" : "pure" ) . ".php";
     907
     908if ( $mod_sockets ) {
     909        class ftp extends ftp_sockets {}
     910} else {
     911        class ftp extends ftp_pure {}
     912}
Note: See TracChangeset for help on using the changeset viewer.