Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jturbide committed Feb 21, 2024
1 parent fb018f5 commit c374b92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Html/Escaper.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ class Escaper extends \Phalcon\Html\Escaper
public function escapeJson(mixed $json = null): string
{
// raw url encode
return rawurlencode(json_validate($json) ? $json : json_encode($json));
return rawurlencode(json_validate($json) ? $json ?? '' : json_encode($json));
}
}

0 comments on commit c374b92

Please sign in to comment.