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

Better exceptions for file upload #2902

Merged
merged 3 commits into from
Jan 6, 2023

Conversation

fballiano
Copy link
Contributor

@fballiano fballiano commented Jan 5, 2023

Since #1313 was closed because the author couldn't fix it I've rewrote it and posted it.

This PR adds some exception messages in case of uploading error.

Messages and constant name/values are taken from https://www.php.net/manual/en/features.file-upload.errors.php

@github-actions github-actions bot added Component: lib/Varien Relates to lib/Varien Component: lib/* Relates to lib/* labels Jan 5, 2023
Copy link
Contributor

@ADDISON74 ADDISON74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this PR for better error management in the case of uploading images. The explanatory phrases were not created but taken from here, which is fine

https://www.php.net/manual/en/features.file-upload.errors.php

@elidrissidev elidrissidev merged commit 8020ce0 into OpenMage:1.9.4.x Jan 6, 2023
@fballiano fballiano deleted the better_upload_exceptions branch January 6, 2023 14:35
fballiano added a commit that referenced this pull request Jan 6, 2023
* Better exceptions for file upload

* PHPCS fixes

* PHPCS fixes
@fballiano
Copy link
Contributor Author

cherry-picked to branch 20.0 since there were no conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: lib/Varien Relates to lib/Varien Component: lib/* Relates to lib/*
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants