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'));
* @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.