Handle missing or invalid asset files gracefully in Asset_Loader.#175
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @[email protected]. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #175 +/- ##
=============================================
- Coverage 50.45% 50.30% -0.16%
- Complexity 379 381 +2
=============================================
Files 27 27
Lines 1992 1998 +6
=============================================
Hits 1005 1005
- Misses 987 993 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dkotter
left a comment
There was a problem hiding this comment.
A couple things here:
- There's a handful of PHPCS things that need cleaned up
- I'd argue the better approach here is an early check to see if the file exists. If not, there's no reason to run any of the code. I think that fixes the issue you're seeing and removes the need for most of the change here
… standards adherence.
I thought about that, but the function can use an asset.php file |
Not sure I follow? It does pull the |
|
Thanks for the PR! In addition to the previous review, I believe we should also have the check and early bail for |
…e-get-warning-from-filemtime()
…'t exist to avoid errors. Minor code cleanup
…n't exist to avoid errors. Minor code cleanup
… as those are meant for JS files only
What?
Closes #174
tide up the enqueue_style() code
Why?
tide up and fix warning