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

WordPress Trac noreply at wordpress.org
Tue Nov 16 18:16:24 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  |     Focuses:
----------------------------+------------------------------

Comment (by TobiasBg):

 Thanks, @adamsilverstein!

 It seems that your latest patches contain a few other code changes as
 well, that are unrelated?

 For consistency with the other two, should the last if check maybe be
 flipped to
 {{{#!php
 // The denominator must not be 0.
 if ( 0 === $denominator ) {
     return 0;
 }

 return $numerator / $denominator;
 }}}

 That way, all if checks return 0.

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


More information about the wp-trac mailing list