Named formula fix for empty formula value

This commit is contained in:
MarkBaker 2021-01-29 15:43:49 +01:00
parent f1b63b7984
commit 65837daa98
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@
},
"require-dev": {
"dompdf/dompdf": "^0.8.5",
"friendsofphp/php-cs-fixer": "^2.16",
"friendsofphp/php-cs-fixer": "^2.16||^2.18",
"jpgraph/jpgraph": "^4.0",
"mpdf/mpdf": "^8.0",
"phpcompatibility/php-compatibility": "^9.3",

View File

@ -17,7 +17,7 @@ class NamedFormula extends DefinedName
?Worksheet $scope = null
) {
// Validate data
if (empty($formula)) {
if (!isset($formula)) {
throw new Exception('You must specify a Formula value for a Named Formula');
}
parent::__construct($name, $worksheet, $formula, $localOnly, $scope);