Skip to content

Commit f8495ea

Browse files
committed
Simplyfied using the ?? operator
1 parent 4aab27f commit f8495ea

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

helper.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,7 @@ function getRevision($id = null) {
109109
}
110110
$meta = $this->getMeta($id);
111111
if($meta){
112-
if (isset($meta['last_change']['date'])) {
113-
return $meta['last_change']['date'];
114-
}
115-
if (isset($meta['date']['modified'])) {
116-
return $meta['date']['modified'];
117-
}
112+
return $meta['last_change']['date'] ?? $meta['date']['modified'];
118113
}
119114
return 0;
120115
}

0 commit comments

Comments
 (0)