From bcd4e1c2c12ecda42536903c5f2d6732b563bc15 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Thu, 8 Dec 2022 08:48:10 +0100 Subject: [PATCH] TypeError: round(): Argument #1 ($num) must be of type int|float --- library/Zend/Db/Profiler/Firebug.php | 2 +- library/Zend/Locale/Math.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/Zend/Db/Profiler/Firebug.php b/library/Zend/Db/Profiler/Firebug.php index d037607004..2071a34805 100644 --- a/library/Zend/Db/Profiler/Firebug.php +++ b/library/Zend/Db/Profiler/Firebug.php @@ -133,7 +133,7 @@ public function queryEnd($queryId) $this->_totalElapsedTime += $profile->getElapsedSecs(); - $this->_message->addRow([(string)round($profile->getElapsedSecs(),5), + $this->_message->addRow([(string)round((float)$profile->getElapsedSecs(),5), $profile->getQuery(), ($params=$profile->getQueryParams())?$params:null]); diff --git a/library/Zend/Locale/Math.php b/library/Zend/Locale/Math.php index 1da3a84a98..705c2bb2f4 100644 --- a/library/Zend/Locale/Math.php +++ b/library/Zend/Locale/Math.php @@ -65,9 +65,9 @@ public static function isBcmathDisabled() public static function round($op1, $precision = 0) { if (self::$_bcmathDisabled) { - $op1 = round($op1, $precision); + $op1 = round((float)$op1, $precision); if (strpos((string) $op1, 'E') === false) { - return self::normalize(round($op1, $precision)); + return self::normalize(round((float)$op1, $precision)); } }