Skip to content

Commit

Permalink
Simplify DatabaseInterface _fetchValue
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed May 31, 2020
1 parent 8e164bd commit ffcabac
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions libraries/classes/DatabaseInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -1392,11 +1392,7 @@ public function fetchSingleRow(
*/
private function _fetchValue(array $row, $value)
{
if ($value === null) {
return $row;
}

return $row[$value];
return $value === null ? $row : $row[$value];
}

/**
Expand Down

0 comments on commit ffcabac

Please sign in to comment.