From 70b9a69c46c935754e66e2d2252c0fb620436dd2 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Thu, 26 Dec 2013 01:55:05 -0600 Subject: [PATCH] SSH2: better accomodate Phar's --- phpseclib/Net/SSH2.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index b111708a..38e6d86f 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -3624,7 +3624,15 @@ class Net_SSH2 */ function _is_includable($suffix) { - foreach (explode(PATH_SEPARATOR, get_include_path()) as $prefix) { + // stream_resolve_include_path was introduced in PHP 5.3.2 + if (function_exists('stream_resolve_include_path')) { + return stream_resolve_include_path($suffix) !== false; + } + + $paths = PATH_SEPARATOR == ':' ? + preg_split('#(?