[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
Fri Jul 8 18:35:23 UTC 2016


#32075: Only set WP_MAX_MEMORY_LIMIT by default when its greater than memory_limit
---------------------------------------------+----------------------
 Reporter:  danielbachhuber                  |       Owner:  ocean90
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  4.6
Component:  Bootstrap/Load                   |     Version:  3.2
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+----------------------

Comment (by ocean90):

 In [changeset:"38017"]:
 {{{
 #!CommitTicketReference repository="" revision="38017"
 Bootstrap: Make `wp_is_ini_value_changeable()` compatible with PHP 5.2.6 -
 5.2.17.

 There is a bug in PHP 5.2.6 - 5.2.17
 (https://bugs.php.net/bug.php?id=44936, https://3v4l.org/IL0A2) which
 changes the access level of a setting to 63 after `ini_set()` was called.
 To continue comparing the access value against `INI_ALL` and `INI_USER`
 use the bit operator `& 7`:

 * `1 & 7 === 1` (INI_USER)
 * `2 & 7 === 2` (INI_PERDIR)
 * `4 & 7 === 4` (INI_SYSTEM)
 * `7 & 7 === 7` (INI_ALL)
 * `63 & 7 === 7` (INI_ALL)

 See [38015].
 See #32075.
 }}}

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


More information about the wp-trac mailing list