From 70c12d2b055fc8b89978a5b77e5fb5d8103f5cb4 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Mon, 14 Feb 2022 23:11:53 +0100 Subject: [PATCH] Eliminate calls to flattenSingleValue() that are no longer required when we're checking for array values as arguments (#2591) --- src/PhpSpreadsheet/Calculation/MathTrig/Arabic.php | 2 +- src/PhpSpreadsheet/Calculation/MathTrig/Base.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/PhpSpreadsheet/Calculation/MathTrig/Arabic.php b/src/PhpSpreadsheet/Calculation/MathTrig/Arabic.php index b8b66829..200d2578 100644 --- a/src/PhpSpreadsheet/Calculation/MathTrig/Arabic.php +++ b/src/PhpSpreadsheet/Calculation/MathTrig/Arabic.php @@ -86,7 +86,7 @@ class Arabic } // An empty string should return 0 - $roman = substr(trim(strtoupper((string) Functions::flattenSingleValue($roman))), 0, 255); + $roman = substr(trim(strtoupper((string) $roman)), 0, 255); if ($roman === '') { return 0; } diff --git a/src/PhpSpreadsheet/Calculation/MathTrig/Base.php b/src/PhpSpreadsheet/Calculation/MathTrig/Base.php index 707fdcef..a31a5681 100644 --- a/src/PhpSpreadsheet/Calculation/MathTrig/Base.php +++ b/src/PhpSpreadsheet/Calculation/MathTrig/Base.php @@ -41,7 +41,6 @@ class Base } catch (Exception $e) { return $e->getMessage(); } - $minLength = Functions::flattenSingleValue($minLength); return self::calculate($number, $radix, $minLength); }