We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 37faf15 + 7716380 commit 714b863Copy full SHA for 714b863
src/Entities/Properties/LastEditedTime.php
@@ -5,6 +5,7 @@
5
use DateTime;
6
use Exception;
7
use FiveamCode\LaravelNotionApi\Exceptions\HandlingException;
8
+use Throwable;
9
10
/**
11
* Class LastEditedTime
@@ -20,10 +21,10 @@ protected function fillFromRaw(): void
20
21
parent::fillFromRaw();
22
23
try {
- if ($this->rawContent !== null) {
24
+ if (is_string($this->rawContent) && $this->rawContent !== null) {
25
$this->content = new DateTime($this->rawContent);
26
}
- } catch (Exception $e) {
27
+ } catch (Throwable $e) {
28
throw HandlingException::instance('The content of last_edited_time is not a valid ISO 8601 date time string.');
29
30
0 commit comments