mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-11 10:36:37 +00:00
Additional for [PR #2964](https://github.com/PHPOffice/PhpSpreadsheet/pull/2964); validate value after extracting from flattened array
This commit is contained in:
@@ -1164,13 +1164,13 @@ class Matrix
|
||||
*/
|
||||
private function validateExtractedValue($value, bool $validValues): array
|
||||
{
|
||||
if (!is_numeric($value) && is_array($value)) {
|
||||
$value = Functions::flattenArray($value)[0];
|
||||
}
|
||||
if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) {
|
||||
$value = trim($value, '"');
|
||||
$validValues &= StringHelper::convertToNumberIfFraction($value);
|
||||
}
|
||||
if (!is_numeric($value) && is_array($value)) {
|
||||
$value = Functions::flattenArray($value)[0];
|
||||
}
|
||||
|
||||
return [$value, $validValues];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user