Skip to content

Commit

Permalink
- Fix validation array
Browse files Browse the repository at this point in the history
  • Loading branch information
daycry committed Dec 19, 2022
1 parent c21d497 commit 352288c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/RestServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,12 @@ protected function validation(String $rules, \Config\Validation $config = null,
{
$this->validator = \Config\Services::validation($config, $getShared);

$content = json_decode(json_encode ( $this->content ) , true);
$content = json_decode(json_encode($this->content), true);
if (!$this->validator->run($content, $rules)) {
throw ValidationException::validationError();
}
unset($content);

if ($filter) {
if ($this->content) {
foreach ($this->content as $key => $value) {
Expand Down

0 comments on commit 352288c

Please sign in to comment.