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

WordPress Trac noreply at wordpress.org
Thu Nov 18 19:02:57 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                                     |
-------------------------------------------------+-------------------------

Comment (by TobiasBg):

 Thanks for the link to the PR! With the weird things that are getting
 passed to the function, `return $str;` makes more sense than `return 0;`
 then, indeed.

 And of course, that new `substr_count` check is what we actually want
 here. Nice catch!

 One more thing: `string` should then be added to the `@return` docblock.
 And both the `@param` and `@return` should maybe get a description.

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


More information about the wp-trac mailing list