-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
docs(http): update return type for getBody #53679
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
Conversation
2781784 to
636af10
Compare
a0aef55 to
33feb34
Compare
❌ Unsupported file formatUpload processing failed due to unsupported file format. Please review the parser error message:
For more help, visit our troubleshooting guide. |
lib/private/Files/Storage/DAV.php
Outdated
| return $response->getBody(); | ||
| $content = $response->getBody(); | ||
|
|
||
| if (is_resource($content)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m always scared by is_resource calls because of the long ongoing migration from resources to objects in PHP.
See https://php.watch/articles/resource-object
File handles are not planned to move to object yet but that may happen someday.
What about:
if (is_string($content) || $content === null) {
return false;
}
return $content;There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
Signed-off-by: Daniel Kesselberg <[email protected]>
Signed-off-by: Daniel Kesselberg <[email protected]>
33feb34 to
de54bdb
Compare

Summary
The code style update in pull request #53625 appears to trigger a Psalm warning about Response returning null, which makes it non-compliant with the interface.
Checklist