PHP 8 fix for #Value!

This commit is contained in:
Dave Umrysh 2023-03-07 11:21:52 -07:00
parent 5100e1112a
commit 82b9e0295a
1 changed files with 16 additions and 1 deletions

View File

@ -3440,7 +3440,22 @@ class PHPExcel_Calculation {
$arg = PHPExcel_Calculation_Functions::flattenSingleValue($arg);
}
unset($arg);
$result = call_user_func_array($functionCall,$args);
// Remove the non-values
if(is_array($args)){
$args = array_diff($args, array("#VALUE!"));
if (count($args) === 0) {
$result = "";
}else{
$result = call_user_func_array($functionCall,$args);
}
}else{
if($args == "#VALUE!"){
$result = "";
}else{
$result = call_user_func_array($functionCall,$args);
}
}
}
// }
if ($functionName != 'MKMATRIX') {