Skip to content

Commit 6cabd97

Browse files
author
MarkBaker
committed
Fix error in handling cell reference when operand is a 1-d array
1 parent bf64ac8 commit 6cabd97

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/PhpSpreadsheet/Calculation/Calculation.php

+6
Original file line numberDiff line numberDiff line change
@@ -4368,6 +4368,12 @@ private static function dataTestReference(&$operandData)
43684368
if (($operandData['reference'] === null) && (is_array($operand))) {
43694369
$rKeys = array_keys($operand);
43704370
$rowKey = array_shift($rKeys);
4371+
if (is_array($operand[$rowKey]) === false) {
4372+
$operandData['value'] = $operand[$rowKey];
4373+
4374+
return $operand[$rowKey];
4375+
}
4376+
43714377
$cKeys = array_keys(array_keys($operand[$rowKey]));
43724378
$colKey = array_shift($cKeys);
43734379
if (ctype_upper("$colKey")) {

0 commit comments

Comments
 (0)