fix nullsafe warning
This commit is contained in:
parent
9c2f78d1d6
commit
d97165e427
1 changed files with 5 additions and 5 deletions
10
_define.php
10
_define.php
|
@ -10,7 +10,7 @@
|
||||||
* @copyright Jean-Christian Denis
|
* @copyright Jean-Christian Denis
|
||||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||||
*/
|
*/
|
||||||
if (!defined('DC_RC_PATH')) {
|
if (!defined('DC_RC_PATH') || is_null(dcCore::app()->auth)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ $this->registerModule(
|
||||||
[
|
[
|
||||||
'requires' => [['core', '2.24']],
|
'requires' => [['core', '2.24']],
|
||||||
'permissions' => dcCore::app()->auth->makePermissions([
|
'permissions' => dcCore::app()->auth->makePermissions([
|
||||||
dcAuth::PERMISSION_USAGE,
|
dcCore::app()->auth::PERMISSION_USAGE,
|
||||||
]),
|
]),
|
||||||
'type' => 'plugin',
|
'type' => 'plugin',
|
||||||
'support' => 'https://github.com/JcDenis/' . basename(__DIR__),
|
'support' => 'https://github.com/JcDenis/' . basename(__DIR__),
|
||||||
|
@ -36,9 +36,9 @@ if (!function_exists('\_mail')) {
|
||||||
{
|
{
|
||||||
$headers = is_array($headers) ? implode("\n\t", $headers) : (string) $headers;
|
$headers = is_array($headers) ? implode("\n\t", $headers) : (string) $headers;
|
||||||
|
|
||||||
$cur = dcCore::app()->con->openCursor(dcCore::app()->prefix . dcLog::LOG_TABLE_NAME);
|
$cur = dcCore::app()->con->openCursor(dcCore::app()->prefix . dcLog::LOG_TABLE_NAME);
|
||||||
$cur->log_table = basename(__DIR__);
|
$cur->setField('log_table', basename(__DIR__));
|
||||||
$cur->log_msg = sprintf("%s\n-----\n To: %s\n Subject: %s\n-----\n Message:\n%s\n", $headers, $to, $subject, $message);
|
$cur->setField('log_msg', sprintf("%s\n-----\n To: %s\n Subject: %s\n-----\n Message:\n%s\n", $headers, $to, $subject, $message));
|
||||||
dcCore::app()->log->addLog($cur);
|
dcCore::app()->log->addLog($cur);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue