remove uninitialized check
parent
6e99c71660
commit
348beb0c44
|
@ -30,7 +30,6 @@ class Backend extends dcNsProcess
|
||||||
public static function init(): bool
|
public static function init(): bool
|
||||||
{
|
{
|
||||||
static::$init = defined('DC_CONTEXT_ADMIN')
|
static::$init = defined('DC_CONTEXT_ADMIN')
|
||||||
&& !is_null(dcCore::app()->auth)
|
|
||||||
&& dcCore::app()->auth->isSuperAdmin();
|
&& dcCore::app()->auth->isSuperAdmin();
|
||||||
|
|
||||||
return static::$init;
|
return static::$init;
|
||||||
|
@ -42,7 +41,7 @@ class Backend extends dcNsProcess
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_null(dcCore::app()->auth) || is_null(dcCore::app()->blog) || is_null(dcCore::app()->adminurl)) {
|
if (is_null(dcCore::app()->blog)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,6 @@ class Config extends dcNsProcess
|
||||||
public static function init(): bool
|
public static function init(): bool
|
||||||
{
|
{
|
||||||
static::$init = defined('DC_CONTEXT_ADMIN')
|
static::$init = defined('DC_CONTEXT_ADMIN')
|
||||||
&& !is_null(dcCore::app()->auth)
|
|
||||||
&& dcCore::app()->auth->isSuperAdmin();
|
&& dcCore::app()->auth->isSuperAdmin();
|
||||||
|
|
||||||
return static::$init;
|
return static::$init;
|
||||||
|
@ -55,7 +54,7 @@ class Config extends dcNsProcess
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_null(dcCore::app()->blog) || is_null(dcCore::app()->adminurl)) {
|
if (is_null(dcCore::app()->blog)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +87,7 @@ class Config extends dcNsProcess
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_null(dcCore::app()->blog) || is_null(dcCore::app()->adminurl)) {
|
if (is_null(dcCore::app()->blog)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,6 @@ class Manage extends dcNsProcess
|
||||||
public static function init(): bool
|
public static function init(): bool
|
||||||
{
|
{
|
||||||
static::$init = defined('DC_CONTEXT_ADMIN')
|
static::$init = defined('DC_CONTEXT_ADMIN')
|
||||||
&& !is_null(dcCore::app()->auth)
|
|
||||||
&& dcCore::app()->auth->isSuperAdmin();
|
&& dcCore::app()->auth->isSuperAdmin();
|
||||||
|
|
||||||
return static::$init;
|
return static::$init;
|
||||||
|
|
|
@ -162,7 +162,7 @@ class CssHeader extends Task
|
||||||
|
|
||||||
public function openModule(): ?bool
|
public function openModule(): ?bool
|
||||||
{
|
{
|
||||||
if (is_null(dcCore::app()->auth)) {
|
if (!isset(dcCore::app()->auth)) {
|
||||||
$this->warning->add(__('Auth is not set'));
|
$this->warning->add(__('Auth is not set'));
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -161,7 +161,7 @@ class PhpHeader extends Task
|
||||||
|
|
||||||
public function openModule(): ?bool
|
public function openModule(): ?bool
|
||||||
{
|
{
|
||||||
if (is_null(dcCore::app()->auth)) {
|
if (!isset(dcCore::app()->auth)) {
|
||||||
$this->warning->add(__('Auth is not set'));
|
$this->warning->add(__('Auth is not set'));
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue