[wp-trac] [WordPress Trac] #55635: wp_convert_hr_to_bytes() report correct byte sizes for php.ini "shorthand" values

WordPress Trac noreply at wordpress.org
Thu Apr 28 03:47:17 UTC 2022


#55635: wp_convert_hr_to_bytes() report correct byte sizes for php.ini "shorthand"
values
-------------------------------------------------+-------------------------
 Reporter:  dmsnell                              |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Upload                               |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  needs-unit-tests has-patch dev-      |     Focuses:
  feedback changes-requested                     |
-------------------------------------------------+-------------------------

Comment (by dmsnell):

 @dd32 another quick thing: I considered moving this function into a new
 file such as `wp-includes/php-compat.php` but ultimately chose not to
 because that would involve adding a new file and then needing to `require`
 it inside `load.php`. That's still an option and possibly a way to isolate
 it's more nuanced behavior from the more general WordPress code int he
 rest of the file. It could also add a nice way to separate some of the
 more cluttered parts of this function into separate helpers. If you think
 it's worth doing that I'd be happy to do so, but so far figured folks
 would prefer leaving this as-is in place since it doesn't require that
 level of separation yet.

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


More information about the wp-trac mailing list