fix nullsafe warnings
This commit is contained in:
parent
d8206c992e
commit
a5384aaea6
@ -14,7 +14,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Dotclear\Plugin\postExpired;
|
namespace Dotclear\Plugin\postExpired;
|
||||||
|
|
||||||
use dcAuth;
|
|
||||||
use dcCore;
|
use dcCore;
|
||||||
use dcNsProcess;
|
use dcNsProcess;
|
||||||
|
|
||||||
@ -22,10 +21,15 @@ class Backend extends dcNsProcess
|
|||||||
{
|
{
|
||||||
public static function init(): bool
|
public static function init(): bool
|
||||||
{
|
{
|
||||||
static::$init = defined('DC_CONTEXT_ADMIN') && dcCore::app()->auth->check(
|
static::$init = defined('DC_CONTEXT_ADMIN')
|
||||||
dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_CONTENT_ADMIN]),
|
&& !is_null(dcCore::app()->auth) && !is_null(dcCore::app()->blog)
|
||||||
dcCore::app()->blog->id
|
&& dcCore::app()->auth->check(
|
||||||
);
|
dcCore::app()->auth->makePermissions(
|
||||||
|
[
|
||||||
|
dcCore::app()->auth::PERMISSION_CONTENT_ADMIN]
|
||||||
|
),
|
||||||
|
dcCore::app()->blog->id
|
||||||
|
);
|
||||||
|
|
||||||
return static::$init;
|
return static::$init;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user