Skip to content

Include Leaf\FS\File errors in request()->errors() - #42

Open
mychidarko wants to merge 2 commits into
v5.xfrom
fix/merge-fs-upload-errors
Open

mychidarko wants to merge 2 commits into
v5.xfrom
fix/merge-fs-upload-errors

Conversation

@mychidarko

Copy link
Copy Markdown
Member

Fixes leafsphp/docs#139.

request()->upload() delegates to Leaf\FS\File::upload(), which records failures (size limit, type, file already exists, etc.) in File's own error array. Request::errors() never merged it, so the docs example (request()->errors() after a failed upload) missed those errors.

Request::errors() now also merges Leaf\FS\File::errors(). leafs/fs is already a hard dependency. One-line change, no API change. Not run against the test suite locally.

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.

Leaf Docs Show Incorrect Error Handling for Files

1 participant