Skip to content

Commit

Permalink
[BUGFIX] Fix RecordService->getSingle return type
Browse files Browse the repository at this point in the history
This fixes the case where reset([]) returned FALSE, but should
return NULL to match the method signature doc comments.
  • Loading branch information
felixbuenemann authored and NamelessCoder committed Dec 12, 2018
1 parent 5403939 commit f1c2765
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Service/RecordService.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function getSingle($table, $fields, $uid)
->where(sprintf('uid = %d', $uid))
->execute()
->fetchAll() ?: [];
return reset($results);
return reset($results) ?: null;
}

/**
Expand Down

0 comments on commit f1c2765

Please sign in to comment.