Skip to content

Commit

Permalink
json_encode never returns an empty string (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsteel authored Jan 29, 2024
1 parent 881b821 commit 898f808
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/component/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#### `Functions`

- [decode](./../../src/Psl/Json/decode.php#L22)
- [encode](./../../src/Psl/Json/encode.php#L25)
- [encode](./../../src/Psl/Json/encode.php#L27)
- [typed](./../../src/Psl/Json/typed.php#L20)


2 changes: 2 additions & 0 deletions src/Psl/Json/encode.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
* @pure
*
* @throws Exception\EncodeException If an error occurred.
*
* @return non-empty-string
*/
function encode(mixed $value, bool $pretty = false, int $flags = 0): string
{
Expand Down

0 comments on commit 898f808

Please sign in to comment.