-
Notifications
You must be signed in to change notification settings - Fork 95
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
Undefined index: size when trying to get the listing of a directories with subdirectories #2
Comments
cramiro
changed the title
Undefined index: size when trying to get the listing of a directories with subdirectories
Feb 13, 2015
Undefined index: size
when trying to get the listing of a directories with subdirectories
I can send a PR with a fix. |
cramiro
added a commit
to cramiro/flysystem-sftp
that referenced
this issue
Feb 19, 2015
What does this Pull Request Do? ------------------------------- * Modified the `normalizeListingObject()` method. Identify the type of the object to normalize. If it's a 'file' the method will still return the same as before, if it's a 'dir' we take out `visibility` and `size` from the returned array. How should this be manually tested? ----------------------------------- A test was included with a similar output you can get in a server, which doesn't include the 'size'. Any background context you want to provide? ------------------------------------------- Currently there's a php `Notice` when trying to list the content of a directory with sub-directories. What are the relevant tickets? ------------------------------ * [Undefined index: size when trying to get the listing of a directories with subdirectories · Issue thephpleague#2 · thephpleague/flysystem-sftp](thephpleague#2) Any extra info? --------------- This is a minor bug. Please, give it a try and let me know.
The problem still happen, because $object some times doesn't have the key
for this
And change the line
for this
|
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Let's say your root has
and you connect to that root and ask:
you will get a
Notice
like this:PHP Notice: Undefined index: size in /your_project/vendor/league/flysystem-sftp/src/SftpAdapter.php on line 205
https://github.com/thephpleague/flysystem-sftp/blob/master/src/SftpAdapter.php#L205
Because
$object['type'] == 2
doesn't havesize
indexThe text was updated successfully, but these errors were encountered: