Skip to content

Commit ef0a194

Browse files
committed
Fix processing REQUEST_TIME_FLOAT value
Avoid using float when parsing REQUEST_TIME_FLOAT, as it may be formatted with a comma, depending on the locale. Otherwise, get this notice when passing 1649168503,0729 to date: > PHP Notice: A non well formed numeric value encountered
1 parent f860cb5 commit ef0a194

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ProfilingData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function getProfilingData(array $profile)
2525
{
2626
$url = $this->getUrl();
2727

28-
$requestTimeFloat = explode('.', $_SERVER['REQUEST_TIME_FLOAT']);
28+
$requestTimeFloat = explode('.', sprintf('%.6F', $_SERVER['REQUEST_TIME_FLOAT']));
2929
if (!isset($requestTimeFloat[1])) {
3030
$requestTimeFloat[1] = 0;
3131
}

0 commit comments

Comments
 (0)