[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
Fri May 13 20:00:24 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):

 I've updated the patch in the [https://github.com/WordPress/wordpress-
 develop/pull/2660 associated PR #2660]. Changes include:
  - renaming the proposed function to `wp_ini_parse_quantity()` to match
 the naming in the [https://github.com/php/php-src/pull/8454 PHP PR #8454]
  - replacing use of `wp_convert_hr_bytes()` with `wp_ini_parse_quantity()`
  - replacing math on parsed memory values with helper functions which
 handle the "no limit" cases

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


More information about the wp-trac mailing list