Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Fixed issue with empty scope being passed throwing exception #45

Merged
merged 1 commit into from
Sep 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Repository/Pdo/AbstractRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public function __construct(PdoService $pdo)
*/
protected function scopesToString(array $scopes) : string
{
if (empty($scopes)) {
return '';
}

return trim(array_reduce($scopes, function ($result, $item) {
return $result . ' ' . $item->getIdentifier();
}));
Expand Down