-
Notifications
You must be signed in to change notification settings - Fork 167
fix(other): php warning: undefined array key 'x-profile-id' #1484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix(other): php warning: undefined array key 'x-profile-id' #1484
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small modification is necessary.
@@ -75,6 +75,9 @@ function send_scheduled_message($handler, $imapMailbox, $folder, $msg_id, $send_ | |||
} | |||
|
|||
if (new DateTime($msg_headers['X-Schedule']) <= new DateTime() || $send_now) { | |||
if (! isset($msg_headers['X-Profile-ID'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put the condition at the same position as X-Schedule at line 73 and use empty instead of isset
8a7f1ed
to
aa41843
Compare
@@ -70,11 +70,18 @@ function send_scheduled_message($handler, $imapMailbox, $folder, $msg_id, $send_ | |||
$msg_headers = $imapMailbox->get_message_headers($folder, $msg_id); | |||
$mailbox_details = $imapMailbox->get_config(); | |||
try { | |||
if (empty($msg_headers['X-Schedule'])) { | |||
if (! isset($msg_headers['X-Schedule'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@christer77 empty
has isset and other condition. keep empty not isset
PHP Warning: Undefined array key "X-Profile-ID" in
...\cypht\modules\smtp\functions.php on line 81