From 46a5581d2b73a29f02659aa4e100eb87a5265bf4 Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 6 Mar 2024 20:34:13 +0200 Subject: [PATCH] fix some PHP Warnings --- api/src/Storage/Tracking.php | 4 ++-- notifications/inc/class.notifications_email.inc.php | 2 +- notifications/inc/class.notifications_popup.inc.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/Storage/Tracking.php b/api/src/Storage/Tracking.php index 61c8659ea0..65a304714a 100644 --- a/api/src/Storage/Tracking.php +++ b/api/src/Storage/Tracking.php @@ -1266,7 +1266,7 @@ abstract class Tracking { error_log($this->app . ' did not properly implement bo_tracking->id_field. Merge skipped.'); } - elseif(class_exists($this->app . '_merge') && $config['signature']) + elseif(class_exists($this->app . '_merge') && !empty($config['signature'])) { $merge_class = $this->app . '_merge'; $merge = new $merge_class(); @@ -1279,7 +1279,7 @@ abstract class Tracking } return $sig; } - return $config['signature']; + return $config['signature'] ?? null; } /** diff --git a/notifications/inc/class.notifications_email.inc.php b/notifications/inc/class.notifications_email.inc.php index ca98bbba77..e7c647a499 100644 --- a/notifications/inc/class.notifications_email.inc.php +++ b/notifications/inc/class.notifications_email.inc.php @@ -79,7 +79,7 @@ class notifications_email implements notifications_iface { // Use configured mail account $ident = null; - if($this->config->async_identity) + if(!empty($this->config->async_identity)) { $ident = Api\Mail\Account::read($this->config->async_identity, $_sender->account_id ?? null); } diff --git a/notifications/inc/class.notifications_popup.inc.php b/notifications/inc/class.notifications_popup.inc.php index 3adccb5f5e..45189ca7c0 100644 --- a/notifications/inc/class.notifications_popup.inc.php +++ b/notifications/inc/class.notifications_popup.inc.php @@ -243,7 +243,7 @@ class notifications_popup implements notifications_iface } else { $image = ''; } - if($link->popup && !$GLOBALS['egw_info']['user']['preferences']['notifications']['external_mailclient']) + if($link->popup && empty($GLOBALS['egw_info']['user']['preferences']['notifications']['external_mailclient'])) { $data = array( "data-app = '{$link->app}'",