Skip to content

Commit 6b4c939

Browse files
committed
round fix
1 parent de18b02 commit 6b4c939

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Payout.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ public function jsonSerialize()
9797

9898
$requestData = Std::removeNullValues($requestData);
9999

100+
/**
101+
* В некоторых версиях PHP необходима тонкая настройка округления при сериализации
102+
* https://stackoverflow.com/questions/42981409/php7-1-json-encode-float-issue
103+
*/
104+
ini_set('serialize_precision', '14');
105+
ini_set('precision', '14');
106+
100107
return json_encode($requestData, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_LINE_TERMINATORS);
101108
}
102109
}

0 commit comments

Comments
 (0)