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

WordPress Trac noreply at wordpress.org
Tue Nov 9 14:43:53 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):

 > Wouldn't it be better to make wp_exif_frac2dec() always return an int or
 float, as inline-documented, and as the name indicates?

 Good question, I considered that. The issue there is potentially breaking
 other code that uses the function and expects it to return the original
 string as it does now and has since WordPress 2.5. When a behavior has
 been in place for a long time like this, changing it can have unexpected
 results. Casting the return feels like a safer change to make, and we
 already cast the return in the two other places wp_exif_frac2dec is used
 in core.

 I'll do a quick search of the plugin repo to see if plugins use this
 directly. What do you think @SergeyBiryukov?

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


More information about the wp-trac mailing list