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.
1 parent af395b6 commit 9c05a63Copy full SHA for 9c05a63
system/Entity/Entity.php
@@ -402,14 +402,18 @@ protected function mapProperty(string $key)
402
* Converts the given string|timestamp|DateTime|Time instance
403
* into the "CodeIgniter\I18n\Time" object.
404
*
405
- * @param DateTime|float|int|string|Time $value
+ * @param DateTime|float|int|string|Time|null $value
406
407
- * @return Time
+ * @return Time|null
408
409
* @throws Exception
410
*/
411
protected function mutateDate($value)
412
{
413
+ if ($value === null) {
414
+ return null;
415
+ }
416
+
417
return DatetimeCast::set($value);
418
}
419
0 commit comments