diff --git a/src/services/RecordRequest.php b/src/services/RecordRequest.php index 10e1cad..8dddc8b 100644 --- a/src/services/RecordRequest.php +++ b/src/services/RecordRequest.php @@ -46,7 +46,7 @@ public function record(): void $model = new ActivityLogModel([ 'userId' => Craft::$app->user->id ?? null, 'url' => $ps[0], - 'query' => $query ? json_encode($query, JSON_THROW_ON_ERROR) : null, + 'query' => $query ? json_encode($query) : null, 'payload' => $payload, 'isAjax' => $this->isAjax(), 'method' => $req->getMethod(), @@ -122,6 +122,6 @@ protected function getPayload() } } - return $payload ? json_encode($payload, JSON_THROW_ON_ERROR) : null; + return $payload ? json_encode($payload) : null; } } \ No newline at end of file diff --git a/src/services/VueTablesActivityLogRetriever.php b/src/services/VueTablesActivityLogRetriever.php index fa9bb44..a95e33c 100644 --- a/src/services/VueTablesActivityLogRetriever.php +++ b/src/services/VueTablesActivityLogRetriever.php @@ -21,7 +21,7 @@ public function retrieve(): array ]); $filters = $req->getQueryParam('query'); $createdAt = $req->getQueryParam('dateCreated'); - $createdAt = $createdAt ? json_decode($createdAt, true, 512, JSON_THROW_ON_ERROR) : null; + $createdAt = $createdAt ? json_decode($createdAt, true) : null; $filters = $filters ? json_decode($filters, true) : []; $createdAtStart = $createdAt ? $createdAt['start'] : Carbon::today()->format('d/m/Y');