mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 02:07:09 +00:00
Drop Net_SSH2::_is_includable() method.
This commit is contained in:
parent
96ccca2817
commit
1afbea613d
@ -3768,32 +3768,4 @@ class Net_SSH2
|
||||
}
|
||||
return $this->exit_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is a path includable?
|
||||
*
|
||||
* @return Boolean
|
||||
* @access private
|
||||
*/
|
||||
function _is_includable($suffix)
|
||||
{
|
||||
// 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('#(?<!phar):#', get_include_path()) :
|
||||
explode(PATH_SEPARATOR, get_include_path());
|
||||
foreach ($paths as $prefix) {
|
||||
$ds = substr($prefix, -1) == DIRECTORY_SEPARATOR ? '' : DIRECTORY_SEPARATOR;
|
||||
$file = $prefix . $ds . $suffix;
|
||||
|
||||
if (file_exists($file)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user