From f6972f0fae15bd62633056d18ec87773745ee92a Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Tue, 15 Dec 2015 00:28:59 +0000 Subject: [PATCH] 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 --- src/wp-admin/includes/class-wp-filesystem-ftpsockets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php index 29ac7888ab..75b43c33b8 100644 --- a/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php +++ b/src/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'));