diff --git a/includes/classes/Command.php b/includes/classes/Command.php index a3689be3ee..0d296a78f1 100644 --- a/includes/classes/Command.php +++ b/includes/classes/Command.php @@ -1530,7 +1530,7 @@ protected function timer_start() { */ protected function timer_stop( $precision = 3 ) { $diff = microtime( true ) - $this->time_start; - return number_format( $diff, $precision ); + return (float) number_format( (float) $diff, $precision ); } /** @@ -1542,7 +1542,7 @@ protected function timer_stop( $precision = 3 ) { * @return string */ protected function timer_format( $microtime, $format = 'H:i:s.u' ) { - $microtime_date = \DateTime::createFromFormat( 'U.u', number_format( $microtime, 3, '.', '' ) ); + $microtime_date = \DateTime::createFromFormat( 'U.u', number_format( (float) $microtime, 3, '.', '' ) ); return $microtime_date->format( $format ); }