X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/03f2fa83c13c1b532284205fa7efcab9b8b2c41f..784f914b1e4b1c62d6657e86397c2e83bcee4295:/wp-admin/includes/class-wp-filesystem-ftpsockets.php diff --git a/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/wp-admin/includes/class-wp-filesystem-ftpsockets.php index 29ac7888..fe74d33c 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpsockets.php +++ b/wp-admin/includes/class-wp-filesystem-ftpsockets.php @@ -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.