Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returned an array when fetching all values when there is no result. #1489

Merged
merged 1 commit into from
Mar 2, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public function values()
* - all: (false) If true, returns all values that match criteria. If false,
* returns the first matching value.
* - default: (null) Default value if no values match criteria. Returns null
* by default.
* by default for single result, empty array for all results.
* - lang: (null) Get values of this language only. Returns values of all
* languages by default.
* @return ValueRepresentation|ValueRepresentation[]|mixed
Expand All @@ -322,7 +322,7 @@ public function value($term, array $options = [])
$options['all'] = false;
}
if (!isset($options['default'])) {
$options['default'] = null;
$options['default'] = $options['all'] ? [] : null;
}
if (!isset($options['lang'])) {
$options['lang'] = null;
Expand Down