magento-lts icon indicating copy to clipboard operation
magento-lts copied to clipboard

Check if remote storage is enabled before saving local file

Open elidrissidev opened this issue 3 years ago • 0 comments

Description (*)

This PR will add a simple check if remote DB storage for media is enabled before trying to write the file locally (using get.php). This will prevent unnecessary exceptions from being logged that say core_file_storage doesn't exist, since it's often created at runtime.

Fixed Issues (if relevant)

  1. Fixes OpenMage/magento-lts#2614

Manual testing scenarios (*)

  1. Have logging enabled and try to access a non-existent media file. e.g: http://<magento_host>/media/catalog/notfound.jpg. You will see an exception logged before this patch, but not after.

Contribution checklist (*)

  • [x] Pull request has a meaningful description of its purpose
  • [x] All commits are accompanied by meaningful commit messages
  • [x] All automated tests passed successfully (all builds are green)
  • [x] Add yourself to contributors list

elidrissidev avatar Sep 30 '22 09:09 elidrissidev