We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25daf60 commit 8bd1358Copy full SHA for 8bd1358
Serializer/JsonSerializer.php
@@ -11,6 +11,7 @@
11
12
namespace Koded\Stdlib\Serializer;
13
14
+use JsonException;
15
use Koded\Stdlib\Serializer;
16
use function Koded\Stdlib\error_log;
17
@@ -51,7 +52,7 @@ public function serialize(mixed $value): ?string
51
52
{
53
try {
54
return json_encode($value, $this->options);
- } catch (\JsonException $e) {
55
+ } catch (JsonException $e) {
56
error_log(__METHOD__, $e->getMessage(), $value);
57
return '';
58
}
@@ -66,7 +67,7 @@ public function unserialize(string $value): mixed
66
67
| JSON_BIGINT_AS_STRING
68
| JSON_THROW_ON_ERROR);
69
70
71
72
73
0 commit comments