]> git.mxchange.org Git - friendica.git/commitdiff
Fixing preamble in enotify
authorPhilipp Holzer <admin@philipp.info>
Wed, 13 Mar 2019 19:44:07 +0000 (20:44 +0100)
committerPhilipp Holzer <admin@philipp.info>
Wed, 13 Mar 2019 19:44:07 +0000 (20:44 +0100)
include/enotify.php

index db44b464deb79b44ae9535163e905786e69bbf87..f9295d5e18df09b91959dc3953a4241290478fa3 100644 (file)
@@ -453,11 +453,20 @@ function notification($params)
                // It will be used by the system to send emails to users (like
                // password reset, invitations and so) using one look (but without
                // add a notification to the user, with could be inexistent)
-               $subject = $params['subject'];
+               if (!isset($params['subject'])) {
+                       Logger::warning('subject isn\'t set.', ['type' => $params['type']]);
+               }
+               $subject = defaults($params, 'subject', '');
 
-               $preamble = $params['preamble'];
+               if (!isset($params['preamble'])) {
+                       Logger::warning('preamble isn\'t set.', ['type' => $params['type'], 'subject' => $subject]);
+               }
+               $preamble = defaults($params, 'preamble', '');
 
-               $body =  $params['body'];
+               if (!isset($params['body'])) {
+                       Logger::warning('body isn\'t set.', ['type' => $params['type'], 'subject' => $subject, 'preamble' => $preamble]);
+               }
+               $body = defaults($params, 'body', '');
 
                $show_in_notification_page = false;
        }