Skip to content

Fix branch pruning resolution of non boolean conditions#1167

Closed
frantzmiccoli wants to merge 1 commit intoPHPOffice:masterfrom
frantzmiccoli:fix-branch-pruning
Closed

Fix branch pruning resolution of non boolean conditions#1167
frantzmiccoli wants to merge 1 commit intoPHPOffice:masterfrom
frantzmiccoli:fix-branch-pruning

Conversation

@frantzmiccoli
Copy link
Contributor

This is:

- [x] a bugfix
- [ ] a new feature

Checklist:

Why this change is needed?

Branch pruning was not properly handling non boolean conditions.

if (isset($storeValue)
&& (
!$storeValueAsBool
|| ($storeValue === '#N/A')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hei, not sure about all possible values here.
should you handle these values here as well?
Screenshot 2019-09-23 at 18 23 09

There should be some method to call to check it's error value or not ... 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good remark. @PowerKiKi ? Is this the strategy that has been followed elsewhere? Should we proceed on that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functions::isError($cellValue) tests for the listed errors, plus the slightly more esoteric #GETTING_DATA

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will modify this accordingly

@frantzmiccoli
Copy link
Contributor Author

Modified accordingly

@rolandsusans
Copy link
Contributor

LGTM, good job 👍

@PowerKiKi PowerKiKi closed this in 75dfcb5 Nov 10, 2019
@PowerKiKi
Copy link
Member

Thank you for following up on this work !

BlackyTay pushed a commit to BlackyTay/PhpSpreadsheet that referenced this pull request Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants