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 */
|
||||
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)
|
||||
{
|
||||
$this->app = $app;
|
||||
|
|
|
@ -173,12 +173,10 @@ class ConfigMenu extends BaseHtmlElement
|
|||
protected function getHealthCount()
|
||||
{
|
||||
$count = 0;
|
||||
$title = null;
|
||||
$worstState = null;
|
||||
foreach (HealthHook::collectHealthData()->select() as $result) {
|
||||
if ($worstState === null || $result->state > $worstState) {
|
||||
$worstState = $result->state;
|
||||
$title = $result->message;
|
||||
$count = 1;
|
||||
} elseif ($worstState === $result->state) {
|
||||
$count++;
|
||||
|
@ -200,8 +198,6 @@ class ConfigMenu extends BaseHtmlElement
|
|||
break;
|
||||
}
|
||||
|
||||
$this->title = $title;
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue