[wp-trac] [WordPress Trac] #54385: Fatal error uploading media on PHP8

WordPress Trac noreply at wordpress.org
Tue Nov 23 19:25:50 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 commit                              |
-------------------------------------------------+-------------------------

Comment (by adamsilverstein):

 @jrf thanks for all your help on this ticket, turns out this little
 function is a good example for the larger conversation around input
 validation and PHP 8+.

 [attachment:"54385.15.diff"] includes all the latest changes from the PR.

 In addition, I added the Sugarloaf Mountain image and a new test to the
 `Tests_Image_Meta` tests, and verified that before the PR changes to
 `wp_exif_frac2dec` that test failed with a PHP fatal under PHP 8.

 Nice to have the test coverage in `Tests_Image_Meta`, which demonstrates
 both that we have fixed the reported issue and that we haven't broken
 existing image meta extraction.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54385#comment:44>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list