Make WordPress Core

Ticket #20187: 20187.2.patch

File 20187.2.patch, 596 bytes (added by kurtpayne, 13 years ago)

Alternate patch

  • class-ftp.php

     
    899899$mod_sockets=TRUE;
    900900if (!extension_loaded('sockets')) {
    901901        $prefix = (PHP_SHLIB_SUFFIX == 'dll') ? 'php_' : '';
    902         if(!@dl($prefix . 'sockets.' . PHP_SHLIB_SUFFIX)) $mod_sockets=FALSE;
     902        if (function_exists('dl') && is_callable('dl'))
     903                @dl( $prefix . 'sockets.' . PHP_SHLIB_SUFFIX );
     904        $mod_sockets = function_exists( 'socket_set_option' );
    903905}
    904906
    905907require_once "class-ftp-".($mod_sockets?"sockets":"pure").".php";