1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-13 19:15:20 +02:00

[ticket/10006] Remove return values

Remove some unneeded return values

PHPBB3-10006
This commit is contained in:
Erik Frèrejean 2011-01-24 16:43:09 +01:00
parent 503b87da48
commit f93ac340a2
2 changed files with 4 additions and 11 deletions

View File

@ -109,18 +109,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 bool $cache Whether this variable should be cached or if it * @param bool $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 configuration entry was deleted successfully, * @return void
* otherwise false
*/ */
public function delete($key, $cache = true) public function delete($key, $cache = true)
{ {
if (!isset($this->config[$key])) if (!isset($this->config[$key]))
{ {
return false; return;
} }
unset($this->config[$key]); unset($this->config[$key]);
return true;
} }
/** /**

View File

@ -96,23 +96,18 @@ class phpbb_config_db extends phpbb_config
* @param String $key The configuration option's name * @param String $key The configuration option's name
* @param bool $cache Whether this variable should be cached or if it * @param bool $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 configuration entry was deleted successfully, * @return void
* otherwise false
*/ */
public function delete($key, $cache = true) public function delete($key, $cache = true)
{ {
if (!isset($this->config[$key])) if (!isset($this->config[$key]))
{ {
return false; 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);
if (!$this->db->sql_affectedrows())
{
return false;
}
unset($this->config[$key]); unset($this->config[$key]);