Skip to content

Commit

Permalink
VID-775: Fix null time created waring in Dash
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Thies committed Jan 31, 2024
1 parent 73006e4 commit cf149da
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function transform_data($data, \stdClass $record) {
$video = \videotimeplugin_repository\video::create($videorecord, $instance->get_context());
if ($createdtime = \DateTime::createFromFormat(
\DateTime::ISO8601,
$video->get_record()->created_time, new \DateTimeZone('UTC'))
$video->get_record()->created_time ?? '', new \DateTimeZone('UTC'))
) {
$createdtime->setTimezone(\core_date::get_user_timezone_object());
return $createdtime->getTimestamp();
Expand Down

0 comments on commit cf149da

Please sign in to comment.