Skip to content

Commit

Permalink
encode the array before assigning it to 'error'
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Dec 11, 2024
1 parent dad8108 commit c73d251
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/common/models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ private function saveOrError(string $msg, int $code = null): void
\Yii::error([
'action' => $msg,
'status' => 'error',
'error' => $this->getFirstErrors(),
'error' => json_encode($this->getFirstErrors()),
]);
if ($code !== null) {
throw new \Exception($msg, $code);
Expand Down

0 comments on commit c73d251

Please sign in to comment.