[wp-trac] [WordPress Trac] #32075: Only set WP_MAX_MEMORY_LIMIT by default when its greater than memory_limit
WordPress Trac
noreply at wordpress.org
Thu Dec 10 08:03:06 UTC 2015
#32075: Only set WP_MAX_MEMORY_LIMIT by default when its greater than memory_limit
------------------------------------+-----------------------------
Reporter: danielbachhuber | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Bootstrap/Load | Version: 3.2
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+-----------------------------
Comment (by jrf):
There's a serious problem with the proposed patch as it doesn't take into
account that the memory limit can be provided using shorthand notation
such as '1G' or '256M'.
`intval()` will just cut off the `G` or `M` from the string which results
in 1G < 256M and 1024K > 256M.
[[Image(http://snag.gy/ldHLT.jpg)]]
I will upload a refreshed patch which will take care of this.
Refs:
http://php.net/manual/en/faq.using.php#faq.using.shorthandbytes
http://php.net/manual/en/function.ini-get.php#refsect1-function.ini-get-
examples
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32075#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list