Skip to content

Commit

Permalink
Merge pull request #22809 from nextcloud/bugfix/noid/remove-unneeded-…
Browse files Browse the repository at this point in the history
…isset-check

Remove unneeded isset check
  • Loading branch information
nickvergessen committed Sep 14, 2020
2 parents 4c0453d + 441adaa commit a053aa7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/AllConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public function setUserValue($userId, $appName, $key, $value, $preCondition = nu
*/
public function getUserValue($userId, $appName, $key, $default = '') {
$data = $this->getUserValues($userId);
if (isset($data[$appName]) and isset($data[$appName][$key])) {
if (isset($data[$appName][$key])) {
return $data[$appName][$key];
} else {
return $default;
Expand Down Expand Up @@ -355,7 +355,7 @@ public function deleteUserValue($userId, $appName, $key) {
'WHERE `userid` = ? AND `appid` = ? AND `configkey` = ?';
$this->connection->executeUpdate($sql, [$userId, $appName, $key]);

if (isset($this->userCache[$userId]) and isset($this->userCache[$userId][$appName])) {
if (isset($this->userCache[$userId][$appName])) {
unset($this->userCache[$userId][$appName][$key]);
}
}
Expand Down

0 comments on commit a053aa7

Please sign in to comment.