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