From b300255f108c90866bcd556e1a5eed2ce4d99653 Mon Sep 17 00:00:00 2001 From: SAI-10600K Date: Wed, 14 Dec 2022 18:33:04 +0900 Subject: [PATCH] 1. Fatal error: 'break' not in the 'loop' or 'switch' context in - FIX 2. Array and string offset access syntax with curly braces is deprecated in - FIX --- lib/PHPExcel/Calculation/Functions.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/PHPExcel/Calculation/Functions.php b/lib/PHPExcel/Calculation/Functions.php index beab5a6..5d92d69 100644 --- a/lib/PHPExcel/Calculation/Functions.php +++ b/lib/PHPExcel/Calculation/Functions.php @@ -308,7 +308,7 @@ public static function isCellValue($idx) { public static function _ifCondition($condition) { $condition = PHPExcel_Calculation_Functions::flattenSingleValue($condition); - if (!in_array($condition{0},array('>', '<', '='))) { + if (!in_array($condition[0],array('>', '<', '='))) { if (!is_numeric($condition)) { $condition = PHPExcel_Calculation::_wrapResult(strtoupper($condition)); } return '='.$condition; } else { @@ -514,13 +514,11 @@ public static function N($value) { case 'float' : case 'integer' : return $value; - break; case 'boolean' : return (integer) $value; - break; case 'string' : // Errors - if ((strlen($value) > 0) && ($value{0} == '#')) { + if ((strlen($value) > 0) && ($value[0] == '#')) { return $value; } break; @@ -567,7 +565,6 @@ public static function TYPE($value) { return 4; } elseif(is_array($value)) { return 64; - break; } elseif(is_string($value)) { // Errors if ((strlen($value) > 0) && ($value{0} == '#')) {