]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/class-wp-filesystem-ftpsockets.php
WordPress 4.5
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-filesystem-ftpsockets.php
index 29ac7888ab4b0fb4bbb69d4e8ab5d4456b7cfcdb..fe74d33c1d4d1d9145eeed5d3f174d48e09af45c 100644 (file)
@@ -39,7 +39,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
                if ( empty($opt['port']) )
                        $this->options['port'] = 21;
                else
-                       $this->options['port'] = $opt['port'];
+                       $this->options['port'] = (int) $opt['port'];
 
                if ( empty($opt['hostname']) )
                        $this->errors->add('empty_hostname', __('FTP hostname is required'));
@@ -342,7 +342,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
         * @return bool
         */
        public function exists( $file ) {
-               $list = $this->ftp->rawlist( $file, '-a' );
+               $list = $this->ftp->nlist( $file );
 
                if ( empty( $list ) && $this->is_dir( $file ) ) {
                        return true; // File is an empty directory.