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.