Resolve Issue #2833, NULL value handling in PRODUCT() Excel function

This commit is contained in:
MarkBaker 2022-05-17 12:56:21 +02:00
parent 092ddbd542
commit 79f5cf99f6
2 changed files with 13 additions and 1 deletions

View File

@ -108,7 +108,7 @@ class Operations
// Loop through arguments // Loop through arguments
foreach (Functions::flattenArray($args) as $arg) { foreach (Functions::flattenArray($args) as $arg) {
// Is it a numeric value? // Is it a numeric value?
if (is_numeric($arg)) { if (is_numeric($arg) || $arg === null) {
if ($returnValue === null) { if ($returnValue === null) {
$returnValue = $arg; $returnValue = $arg;
} else { } else {

View File

@ -48,6 +48,18 @@ return [
-6.7800000000000002, -6.7800000000000002,
-2, -2,
], ],
[
0,
12.5,
null,
2.5,
],
[
0,
12.5,
2.5,
null,
],
['#VALUE!', 1, 'y', 3], ['#VALUE!', 1, 'y', 3],
[6, 1, '2', 3], [6, 1, '2', 3],
]; ];