mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
DateFormatter: Fix Variable '$formatted' is probably undefined
This commit is contained in:
parent
dbc8579747
commit
6baf3bc80a
@ -159,6 +159,8 @@ class DateFormatter
|
|||||||
if ($timeOnly) {
|
if ($timeOnly) {
|
||||||
return $ago;
|
return $ago;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$formatted = null;
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case static::DATE:
|
case static::DATE:
|
||||||
// Move to next case
|
// Move to next case
|
||||||
@ -196,6 +198,8 @@ class DateFormatter
|
|||||||
if ($timeOnly) {
|
if ($timeOnly) {
|
||||||
return $since;
|
return $since;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$formatted = null;
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case static::RELATIVE:
|
case static::RELATIVE:
|
||||||
$formatted = sprintf(
|
$formatted = sprintf(
|
||||||
@ -235,6 +239,8 @@ class DateFormatter
|
|||||||
if ($timeOnly) {
|
if ($timeOnly) {
|
||||||
return $until;
|
return $until;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$formatted = null;
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case static::DATE:
|
case static::DATE:
|
||||||
// Move to next case
|
// Move to next case
|
||||||
|
Loading…
x
Reference in New Issue
Block a user