fix nullsafe warning

master
Jean-Christian Paul Denis 2023-05-01 01:10:24 +02:00
parent a036d037ac
commit 4afb4d73c2
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
2 changed files with 4 additions and 2 deletions

View File

@ -37,6 +37,8 @@ class My
*/
public static function name(): string
{
return __((string) dcCore::app()->plugins->moduleInfo(self::id(), 'name'));
$name = dcCore::app()->plugins->moduleInfo(self::id(), 'name');
return __(is_string($name) ? $name : self::id());
}
}

View File

@ -64,7 +64,7 @@ class Prepend extends dcNsProcess
}
// Use visible redirection
if ($redir) {
if ($redir && !is_null(dcCore::app()->blog)) {
Http::redirect(dcCore::app()->blog->url . $part);
}