mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-23 01:51:31 +02:00
[ticket/10006] Remove unneeded if statements
Remove some of the additional `if (isset)` checks PHPBB3-10006
This commit is contained in:
@@ -113,11 +113,6 @@ class phpbb_config implements ArrayAccess, IteratorAggregate, Countable
|
|||||||
*/
|
*/
|
||||||
public function delete($key, $cache = true)
|
public function delete($key, $cache = true)
|
||||||
{
|
{
|
||||||
if (!isset($this->config[$key]))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
unset($this->config[$key]);
|
unset($this->config[$key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -100,11 +100,6 @@ class phpbb_config_db extends phpbb_config
|
|||||||
*/
|
*/
|
||||||
public function delete($key, $cache = true)
|
public function delete($key, $cache = true)
|
||||||
{
|
{
|
||||||
if (!isset($this->config[$key]))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = 'DELETE FROM ' . $this->table . "
|
$sql = 'DELETE FROM ' . $this->table . "
|
||||||
WHERE config_name = '" . $this->db->sql_escape($key) . "'";
|
WHERE config_name = '" . $this->db->sql_escape($key) . "'";
|
||||||
$this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
|
Reference in New Issue
Block a user