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

WordPress Trac noreply at wordpress.org
Tue Nov 9 00:26:27 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:  has-patch     |     Focuses:
--------------------------+------------------------------

Comment (by adamsilverstein):

 In my testing with your image, the value passed to `wp_exif_frac2dec`
 wound up being "0/0", and that string was returned by the function
 directly because `empty( $denominator )` winds up being true in the
 conditional (empty( 0 ) is true).

 In [attachment:"54385.2.diff"]:
  - Cast the result to `float`
  - Update doc block to clarify that the returns a float or a string

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


More information about the wp-trac mailing list