mirror of
https://github.com/unraid/webgui.git
synced 2026-02-18 06:58:47 -06:00
fix: Correct logic in releaseDateYear function to only set timestamp if it exists, ensuring accurate year display in footer
This commit is contained in:
@@ -2,13 +2,12 @@
|
||||
function releaseDateYear() {
|
||||
global $var;
|
||||
|
||||
$date = new DateTime();
|
||||
$timestamp = _var($var, 'regBuildTime', '');
|
||||
if (!$timestamp) {
|
||||
return '';
|
||||
if ($timestamp) {
|
||||
$date->setTimestamp($timestamp);
|
||||
}
|
||||
|
||||
$date = new DateTime();
|
||||
$date->setTimestamp($timestamp);
|
||||
return $date->format('Y');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user