Minor scrutinizer fixes (#1226)

* Minor scrutinizer fixes

* Remove spurious debug output
This commit is contained in:
Mark Baker 2019-10-30 20:30:52 +01:00 committed by GitHub
parent 429a34cb14
commit 1b4098da8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -3658,8 +3658,8 @@ class Calculation
$rangeWS2 = $rangeWS1; $rangeWS2 = $rangeWS1;
} }
$refSheet = $pCellParent; $refSheet = $pCellParent;
if ($rangeSheetRef !== $pCellParent->getTitle()) { if ($pCellParent !== null && $rangeSheetRef !== $pCellParent->getTitle()) {
$refSheet = $pCell->getWorksheet()->getParent()->getSheetByName($rangeSheetRef); $refSheet = $pCellParent->getParent()->getSheetByName($rangeSheetRef);
} }
if ((is_int($startRowColRef)) && (ctype_digit($val)) && if ((is_int($startRowColRef)) && (ctype_digit($val)) &&
($startRowColRef <= 1048576) && ($val <= 1048576)) { ($startRowColRef <= 1048576) && ($val <= 1048576)) {

View File

@ -266,7 +266,7 @@ class TextData
if (!is_numeric($value) || !is_numeric($decimals)) { if (!is_numeric($value) || !is_numeric($decimals)) {
return Functions::NAN(); return Functions::NAN();
} }
$decimals = floor($decimals); $decimals = (int) floor($decimals);
$valueResult = round($value, $decimals); $valueResult = round($value, $decimals);
if ($decimals < 0) { if ($decimals < 0) {