mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/10139] Make signatures of set_atomic() consistent by using $new_value.
PHPBB3-10139
This commit is contained in:
@@ -135,16 +135,16 @@ class phpbb_config implements ArrayAccess, IteratorAggregate, Countable
|
|||||||
*
|
*
|
||||||
* @param string $key The configuration option's name
|
* @param string $key The configuration option's name
|
||||||
* @param string $old_value Current configuration value
|
* @param string $old_value Current configuration value
|
||||||
* @param string $value New configuration value
|
* @param string $new_value New configuration value
|
||||||
* @param bool $use_cache Whether this variable should be cached or if it
|
* @param bool $use_cache Whether this variable should be cached or if it
|
||||||
* changes too frequently to be efficiently cached.
|
* changes too frequently to be efficiently cached.
|
||||||
* @return bool True if the value was changed, false otherwise.
|
* @return bool True if the value was changed, false otherwise.
|
||||||
*/
|
*/
|
||||||
public function set_atomic($key, $old_value, $value, $use_cache = true)
|
public function set_atomic($key, $old_value, $new_value, $use_cache = true)
|
||||||
{
|
{
|
||||||
if (!isset($this->config[$key]) || $this->config[$key] == $old_value)
|
if (!isset($this->config[$key]) || $this->config[$key] == $old_value)
|
||||||
{
|
{
|
||||||
$this->config[$key] = $value;
|
$this->config[$key] = $new_value;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user