Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cast ssh resource into int to be compliant with php >=7.0 #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

paulandrieux
Copy link

With php >=7.0, I have the following error when I try to create a directory to a sftp server:

The directory 'my_dir' does not exist and could not be created. at /my_project/vendor/knplabs/gaufrette/src/Gaufrette/Adapter/Sftp.php:209)"}

The gaufrette adapter fails because of the Ssh\Sftp:getUrl() method returning an url like ssh2.sftp://Resource id #324/my_dir, which is incompatible in php >=7.0.

The following bug describe my issue: https://bugs.php.net/bug.php?id=73561

It is solvable by casting the resource into int before inject it in the url.

@IanSimpson
Copy link

Duplicate of #60 (And #62, #63)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants