mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-25 11:20:03 +00:00
SFTP: make it so extending SFTP class doesn't cause a segfault
This commit is contained in:
parent
41eb0d8012
commit
c301ddf38f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user