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

WordPress Trac noreply at wordpress.org
Tue Nov 16 18:59:23 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                                     |
-------------------------------------------------+-------------------------
Changes (by adamsilverstein):

 * keywords:  php8 has-patch => php8 has-patch needs-dev-note has-unit-tests


Comment:

 In [attachment:"54385.7.diff"]
 * Return 0 if fraction parsing error occurs
 * Ensure only one "/" in fraction
 * Ensure denominator and numerator are numeric.
 * Add tests.

 Possibly worth adding a dev note for this change? The function is now a
 little more strict about input handling and will return 0 instead of the
 passed string in error cases (like "0/0").

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


More information about the wp-trac mailing list