parent
86bb4f9356
commit
445cc18e39
|
@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
|
|||
|
||||
### Fixed
|
||||
|
||||
- IF implementation properly handles the value `#N/A` [#1165](https://github.com/PHPOffice/PhpSpreadsheet/pull/1165)
|
||||
- Formula Parser: Wrong line count for stuff like "MyOtherSheet!A:D" [#1215](https://github.com/PHPOffice/PhpSpreadsheet/issues/1215)
|
||||
- Call garbage collector after removing a column to prevent stale cached values
|
||||
- Trying to remove a column that doesn't exist deletes the latest column
|
||||
|
|
|
@ -266,6 +266,10 @@ class Logical
|
|||
*/
|
||||
public static function statementIf($condition = true, $returnIfTrue = 0, $returnIfFalse = false)
|
||||
{
|
||||
if (Functions::isError($condition)) {
|
||||
return $condition;
|
||||
}
|
||||
|
||||
$condition = ($condition === null) ? true : (bool) Functions::flattenSingleValue($condition);
|
||||
$returnIfTrue = ($returnIfTrue === null) ? 0 : Functions::flattenSingleValue($returnIfTrue);
|
||||
$returnIfFalse = ($returnIfFalse === null) ? false : Functions::flattenSingleValue($returnIfFalse);
|
||||
|
|
|
@ -34,4 +34,10 @@ return [
|
|||
'ABC',
|
||||
'XYZ',
|
||||
],
|
||||
[
|
||||
'#N/A',
|
||||
'#N/A',
|
||||
'ABC',
|
||||
'XYZ',
|
||||
],
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue