Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #37680


Ignore:
Timestamp:
08/17/2016 02:47:20 AM (8 years ago)
Author:
dd32
Comment:

I primarily see two main options:

That then leaves the question of what to do when disabled, Do we return true anyway as a "We can't determine if it's changeable, so we're just assuming it probably is."? or do we just continue to return false as 4.6 currently does?

I've taken the angle that we should return true in the event we can't be sure, this may result in PHP warnings being emitted from ini_set(), however we already silence warnings on the ini_set()'s at least for the memory_limit (which is the only thing this function is used for currently). It's the is_array() block at the end of the function in both patches that's responsible for this behaviour.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #37680 – Description

    initial v1  
    1212 - A PHP Warning will be displayed on sites post-upgrade to 4.6.
    1313 - `wp_raise_memory_limit()` will fail to increase the memory limit, which may result in some admin pages not loading, or image uploads failing to create resized images.
     14 - WSOD - Single-site installs will not increase their memory limit to 40M, multisite will fail to increase to 64M, both of these could cause WSOD if the memory limit was set arbitrarily low and the site was running plugins which use a lot of memory.
    1415
    1516We should fix this to at least not present with a PHP Warning, although I recognise that almost any function could be in the `disable_plugin` setting, some (such as `phpinfo()` and `ini_*`) are historically much more likely to be there.