math_eval
math_eval copied to clipboard
Throw exception on invalid expression instead of giving PHP error
When math_eval() is given an invalid math expression, the MathParser package returns a null AST. This PR changes the behaviour by throwing an InvalidExpression exception instead which make it catchable.
Pull Request Test Coverage Report for Build 23
- 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage remained the same at 100.0%
| Totals | |
|---|---|
| Change from base Build 21: | 0.0% |
| Covered Lines: | 13 |
| Relevant Lines: | 13 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 23
- 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage remained the same at 100.0%
| Totals | |
|---|---|
| Change from base Build 21: | 0.0% |
| Covered Lines: | 13 |
| Relevant Lines: | 13 |