mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
Avoid use of dynamic properties deprecated in PHP 8.2
This commit is contained in:
parent
6de4bd6e7e
commit
825f3a9b7f
@ -50,6 +50,9 @@ abstract class Command
|
|||||||
/** @var bool Whether to automatically load enabled modules */
|
/** @var bool Whether to automatically load enabled modules */
|
||||||
protected $loadEnabledModules = true;
|
protected $loadEnabledModules = true;
|
||||||
|
|
||||||
|
/** @var bool Whether to enable trace for the CLI commands */
|
||||||
|
protected $trace = false;
|
||||||
|
|
||||||
public function __construct(App $app, $moduleName, $commandName, $actionName, $initialize = true)
|
public function __construct(App $app, $moduleName, $commandName, $actionName, $initialize = true)
|
||||||
{
|
{
|
||||||
$this->app = $app;
|
$this->app = $app;
|
||||||
|
@ -173,12 +173,10 @@ class ConfigMenu extends BaseHtmlElement
|
|||||||
protected function getHealthCount()
|
protected function getHealthCount()
|
||||||
{
|
{
|
||||||
$count = 0;
|
$count = 0;
|
||||||
$title = null;
|
|
||||||
$worstState = null;
|
$worstState = null;
|
||||||
foreach (HealthHook::collectHealthData()->select() as $result) {
|
foreach (HealthHook::collectHealthData()->select() as $result) {
|
||||||
if ($worstState === null || $result->state > $worstState) {
|
if ($worstState === null || $result->state > $worstState) {
|
||||||
$worstState = $result->state;
|
$worstState = $result->state;
|
||||||
$title = $result->message;
|
|
||||||
$count = 1;
|
$count = 1;
|
||||||
} elseif ($worstState === $result->state) {
|
} elseif ($worstState === $result->state) {
|
||||||
$count++;
|
$count++;
|
||||||
@ -200,8 +198,6 @@ class ConfigMenu extends BaseHtmlElement
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->title = $title;
|
|
||||||
|
|
||||||
return $count;
|
return $count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user