WordPress.org

Make WordPress Core

Ticket #20187: 20187.patch

File 20187.patch, 532 bytes (added by merty, 3 years ago)
  • 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(!is_callable('dl') || !@dl($prefix . 'sockets.' . PHP_SHLIB_SUFFIX)) $mod_sockets=FALSE; 
    903903} 
    904904 
    905905require_once "class-ftp-".($mod_sockets?"sockets":"pure").".php";