Skip to content

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

Open
paulandrieux wants to merge 1 commit intoHerzult:masterfrom
paulandrieux:bugfix/cast-resource-sftp
Open

cast ssh resource into int to be compliant with php >=7.0#70
paulandrieux wants to merge 1 commit intoHerzult:masterfrom
paulandrieux:bugfix/cast-resource-sftp

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