Because of how the timestamps are created using microtime allowing for microsecond precision timestamps that occur exactly on the second will be integers. The DateTimeImmutable::format method expects a string representation of a floating point number and will fail.
The solution is to use sprintf and format the output of microtime to always have 4 decimal points.
Because of how the timestamps are created using `microtime` allowing for microsecond precision timestamps that occur exactly on the second will be integers. The `DateTimeImmutable::format` method expects a string representation of a floating point number and will fail.
The solution is to use `sprintf` and format the output of `microtime` to always have 4 decimal points.
Because of how the timestamps are created using
microtime
allowing for microsecond precision timestamps that occur exactly on the second will be integers. TheDateTimeImmutable::format
method expects a string representation of a floating point number and will fail.The solution is to use
sprintf
and format the output ofmicrotime
to always have 4 decimal points.Fixed in
0a710986cd
.