Skip to content

Commit

Permalink
remove type hints for php7.2 compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
matfish3 committed Apr 26, 2023
1 parent 96fb650 commit ea1470a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/services/RecordRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -122,6 +122,6 @@ protected function getPayload()
}
}

return $payload ? json_encode($payload, JSON_THROW_ON_ERROR) : null;
return $payload ? json_encode($payload) : null;
}
}
2 changes: 1 addition & 1 deletion src/services/VueTablesActivityLogRetriever.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit ea1470a

Please sign in to comment.