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

WordPress Trac noreply at wordpress.org
Mon Nov 8 08:06:13 UTC 2021


#54385: Fatal error uploading media on PHP8
--------------------------+---------------------
 Reporter:  stevegs       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.9
Component:  Media         |     Version:  2.5
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+---------------------

Comment (by praem90):

 As per the
 [https://developer.wordpress.org/reference/functions/wp_exif_frac2dec/#source],
 it looks like the function would return the same string if there is no
 slash (/) or the denominator is empty.

 The given string may not be casted into int.

 And the documentation needs to updated.

 Replying to [comment:2 stevegs]:
 > The strange thing about this is only **some** EXIF files cause the
 problem, but it seems no JFIF file does so.
 >
 > I've generally found PHP8 is a lot more strict (especially regarding
 typedefs or unexpected nulls) than its predecessor, having found many
 similar errors in some plugins (resolved by updating, re-writing or
 deleting).  Hope this has been helpful.

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


More information about the wp-trac mailing list