Test fixes for PHP 7.4 stricter behaviour

This commit is contained in:
MarkBaker 2019-07-25 21:18:02 +02:00 committed by Adrien Crivelli
parent 8972d370a6
commit b894b98a2c
2 changed files with 2 additions and 2 deletions

View File

@ -3644,7 +3644,7 @@ class Calculation
} else { // it's a variable, constant, string, number or boolean
// If the last entry on the stack was a : operator, then we may have a row or column range reference
$testPrevOp = $stack->last(1);
if ($testPrevOp['value'] == ':') {
if ($testPrevOp !== null && $testPrevOp['value'] === ':') {
$startRowColRef = $output[count($output) - 1]['value'];
[$rangeWS1, $startRowColRef] = Worksheet::extractSheetTitle($startRowColRef, true);
if ($rangeWS1 != '') {

View File

@ -35,7 +35,7 @@ class ComplexAssert
public function assertComplexEquals($expected, $actual, $delta = 0)
{
if ($expected === INF || $expected[0] === '#') {
if ($expected === INF || (is_string($expected) && $expected[0] === '#')) {
return $this->testExpectedExceptions($expected, $actual);
}