Skip to content

Commit

Permalink
SFTP: optimize call to parent login method for 2.0 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Apr 4, 2020
1 parent e02b934 commit 9c0ad2f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions phpseclib/Net/SFTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,7 @@ function __construct($host, $port = 22, $timeout = 10)
*/
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;
}

Expand Down

0 comments on commit 9c0ad2f

Please sign in to comment.