Skip to content

Commit

Permalink
ENH Improve type safety to support refactored template layer
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Sep 26, 2024
1 parent 74f9efa commit 4e84fbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions code/Controller/AssetAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,8 @@ public function apiHistory(HTTPRequest $request): HTTPResponse

$output[] = array(
'versionid' => (int) $version->Version,
'date_ago' => $version->dbObject('LastEdited')->Ago(),
'date_formatted' => $version->dbObject('LastEdited')->Nice(),
'date_ago' => $version->dbObject('LastEdited')?->Ago(),
'date_formatted' => $version->dbObject('LastEdited')?->Nice(),
'status' => ($version->WasPublished) ? _t(__CLASS__.'.PUBLISHED', 'Published') : '',
'author' => ($author)
? $author->Name
Expand Down
2 changes: 1 addition & 1 deletion code/Forms/FileHistoryFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected function getSpecsMarkup($record)
? _t(__CLASS__ . '.PUBLISHED', 'Published')
: _t(__CLASS__ . '.SAVED', 'Saved'),
Convert::raw2att($record->LastEdited),
Convert::raw2xml($record->dbObject('LastEdited')->Ago())
Convert::raw2xml($record->dbObject('LastEdited')?->Ago())
);
return sprintf(
'<div class="editor__specs">%s %s, %s %s</div>',
Expand Down

0 comments on commit 4e84fbd

Please sign in to comment.