php-ssh
php-ssh copied to clipboard
Fix SFTP getUrl function for PHP >= 5.6.28
PHP 5.6.28 made an (apparently undocumented) change for scanning an SFTP directory. Previously the URL was created by casting the Resource as a string ("Resource #27"), now it requires it to be cast as an int ("27").
Previously this function returned ssh2.sftp://Resource #27/my/url, now returns ssh2.sftp://27/my/url.
The "new" method has been tested in 5.6.26 and still works correctly (as well as 5.6.29 and 7.0.14).
you are right, I'll take a look