Replace methods with safe variants. Let's see how this works out.

This commit is contained in:
James Cole
2025-05-04 12:11:25 +02:00
parent fb31f25d71
commit 446e855b74
71 changed files with 480 additions and 353 deletions

View File

@@ -81,7 +81,7 @@ class AccountSearch implements GenericSearchInterface
// meta data:
$searchQuery->orWhere(
static function (Builder $q) use ($originalQuery): void {
$json = json_encode($originalQuery, JSON_THROW_ON_ERROR);
$json = \Safe\json_encode($originalQuery, JSON_THROW_ON_ERROR);
$q->where('account_meta.name', '=', 'account_number');
$q->whereLike('account_meta.data', $json);
}
@@ -108,7 +108,7 @@ class AccountSearch implements GenericSearchInterface
// meta data:
$searchQuery->Where(
static function (Builder $q) use ($originalQuery): void {
$json = json_encode($originalQuery, JSON_THROW_ON_ERROR);
$json = \Safe\json_encode($originalQuery, JSON_THROW_ON_ERROR);
$q->where('account_meta.name', 'account_number');
$q->where('account_meta.data', $json);
}