Skip to content

Commit

Permalink
email_store() should always set EMAIL_SHUTDOWN_GENERATED flag
Browse files Browse the repository at this point in the history
Even though the code in email_shutdown_function() handles the
EMAIL_SHUTDOWN_FORCE flag as though EMAIL_SHUTDOWN_GENERATED were also
set, it is technically more correct to always set the flag.

Issue #17460
  • Loading branch information
dregad committed Apr 5, 2015
1 parent ca7d087 commit 037b99a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/email_api.php
Expand Up @@ -788,10 +788,9 @@ function email_store( $p_recipient, $p_subject, $p_message, array $p_headers = n
$t_email_id = email_queue_add( $t_email_data );

# Set the email processing flag for the shutdown function
$g_email_shutdown_processing |= EMAIL_SHUTDOWN_GENERATED;
if( $p_force ) {
$g_email_shutdown_processing |= EMAIL_SHUTDOWN_FORCE;
} else {
$g_email_shutdown_processing |= EMAIL_SHUTDOWN_GENERATED;
}

return $t_email_id;
Expand Down

0 comments on commit 037b99a

Please sign in to comment.