Merge e2609c9bef into 8459666841
This commit is contained in:
2 files changed
+16
-2
No files matched your search
@@ -243,7 +243,14 @@ class WorksheetManager implements WorksheetManagerInterface
|
||||
} elseif ($cell->isEmpty()) {
|
||||
$data .= '/>';
|
||||
} else {
|
||||
throw new InvalidArgumentException('Trying to add a value with an unsupported type: ' . \gettype($cell->getValue()));
|
||||
$value = $cell->getValueEvenIfError();
|
||||
|
||||
$errorMessage = 'Trying to add a value with an unsupported type: ' . \gettype($value);
|
||||
if (\is_object($value)) {
|
||||
$errorMessage .= ' (' . \get_class($value) . ' given)';
|
||||
}
|
||||
|
||||
throw new InvalidArgumentException($errorMessage);
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
||||
@@ -246,7 +246,14 @@ EOD;
|
||||
$cellXML = '';
|
||||
}
|
||||
} else {
|
||||
throw new InvalidArgumentException('Trying to add a value with an unsupported type: ' . \gettype($cell->getValue()));
|
||||
$value = $cell->getValueEvenIfError();
|
||||
|
||||
$errorMessage = 'Trying to add a value with an unsupported type: ' . \gettype($value);
|
||||
if (\is_object($value)) {
|
||||
$errorMessage .= ' (' . \get_class($value) . ' given)';
|
||||
}
|
||||
|
||||
throw new InvalidArgumentException($errorMessage);
|
||||
}
|
||||
|
||||
return $cellXML;
|
||||
|
||||
Reference in new issue
Block a user