Skip to content

Commit aabe2e1

Browse files
committed
Always use JSON_THROW_ON_ERROR
1 parent f888fd7 commit aabe2e1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Search/FacetSearchResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function toArray(): array
4747

4848
public function toJSON(): string
4949
{
50-
return json_encode($this->toArray(), JSON_PRETTY_PRINT);
50+
return json_encode($this->toArray(), JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR);
5151
}
5252

5353
public function getIterator(): \ArrayIterator

src/Search/SearchResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public function toArray(): array
245245

246246
public function toJSON(): string
247247
{
248-
return json_encode($this->toArray(), JSON_PRETTY_PRINT);
248+
return json_encode($this->toArray(), JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR);
249249
}
250250

251251
public function getIterator(): \ArrayIterator

0 commit comments

Comments
 (0)