diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index a118d45e..f8650f89 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -467,7 +467,11 @@ class Net_SFTP extends Net_SSH2 */ function login($username) { - if (!call_user_func_array(array(&$this, 'parent::login'), func_get_args())) { + $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)) { return false; }