diff --git a/phpseclib/Net/SFTP/Stream.php b/phpseclib/Net/SFTP/Stream.php index a944d7f0..4ec80996 100644 --- a/phpseclib/Net/SFTP/Stream.php +++ b/phpseclib/Net/SFTP/Stream.php @@ -197,7 +197,7 @@ class Net_SFTP_Stream if ($host[0] == '$') { $host = substr($host, 1); - global $$host; + global ${$host}; if (!is_object($$host) || get_class($$host) != 'Net_SFTP') { return false; }