Merge e2609c9bef0f45b54cd9b60200f7c511f5df7c16 into 84596668410bea89d21aa9867b91e1550e359329
This commit is contained in:
commit
7aad52af4a
@ -243,7 +243,14 @@ class WorksheetManager implements WorksheetManagerInterface
|
|||||||
} elseif ($cell->isEmpty()) {
|
} elseif ($cell->isEmpty()) {
|
||||||
$data .= '/>';
|
$data .= '/>';
|
||||||
} else {
|
} 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;
|
return $data;
|
||||||
|
@ -246,7 +246,14 @@ EOD;
|
|||||||
$cellXML = '';
|
$cellXML = '';
|
||||||
}
|
}
|
||||||
} else {
|
} 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;
|
return $cellXML;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user