From 91e84a24c292d583e4fdcd7e6b07b585d0f8a971 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 4 Apr 2020 12:20:36 -0500 Subject: [PATCH] SFTP: optimize call to parent login method for 2.0 branch --- phpseclib/Net/SFTP.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 28946396..bf7ef36b 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -412,11 +412,7 @@ class SFTP extends SSH2 */ function login($username) { - $args = func_get_args(); - $callback = version_compare(PHP_VERSION, '5.3.0') < 0 : - array(&$this, 'parent::login') : - 'parent::login'; - if (!call_user_func_array($callback, $args)) { + if (!call_user_func_array('parent::login', func_get_args())) { return false; }