Skip to content

Commit 45939ee

Browse files
authored
Update Common.php
If it is a long floating-point number string, JSON_ Decode returns the scientific notation. Causes the database to write scientific count values.
1 parent 91e8a8e commit 45939ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Common/Common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected static function safeJsonString($fieldValue)
5757

5858
protected static function is_json($str): bool
5959
{
60-
if (!is_string($str)) {
60+
if (!is_string($str) || is_numeric($str)) {
6161
return false;
6262
}
6363
$json = json_decode($str);

0 commit comments

Comments
 (0)