[wp-trac] [WordPress Trac] #54385: Fatal error uploading media on PHP8
WordPress Trac
noreply at wordpress.org
Thu Nov 18 18:36:46 UTC 2021
#54385: Fatal error uploading media on PHP8
-------------------------------------------------+-------------------------
Reporter: stevegs | Owner:
| adamsilverstein
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.9
Component: Media | Version: 2.5
Severity: normal | Resolution:
Keywords: php8 has-patch needs-dev-note has- | Focuses:
unit-tests |
-------------------------------------------------+-------------------------
Comment (by adamsilverstein):
In [attachment:"54385.10.diff"]
* Cleaned up strings, doc blocks a bit.
* Improved test case structure
* Add some new test cases for typical values after researching exif values
that are passed to the function in our use.
props @jrf for feedback on the GitHub draft PR.
Thanks for the feedback @stevegs and @TobiasBg... re: `str_contains`, in
the latest patch I use `substr_count( $str, '/' )` to ensure the string
contains one and only one `/` which @jrf suggested on the PR. What do you
think?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54385#comment:31>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list