Filesystem API: Cast the port to an int in the FTPSockets class. PemFTP requires that the port be specified as an integer, not a numeric string.

Fixes #35088


git-svn-id: https://develop.svn.wordpress.org/trunk@35942 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2015-12-15 00:28:59 +00:00
parent 6de1483105
commit f6972f0fae

View 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'));