Skip to content

Commit

Permalink
Merge pull request #16449 from daraelmin/daraelmin-patch-3
Browse files Browse the repository at this point in the history
Fix #16420 undefined  $model_mail_selected_id
  • Loading branch information
eldy authored Feb 26, 2021
2 parents 4e6562f + e7ae2e6 commit cec9c65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/core/class/html.formmail.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ public function get_form($addfileaction = 'addfile', $removefileaction = 'remove

// Zone to select email template
if (count($modelmail_array) > 0) {
$model_mail_selected_id = GETPOSTISSET('modelmailselected') ? GETPOST('modelmailselected', 'int') : $arraydefaultmessage->id;
$model_mail_selected_id = GETPOSTISSET('modelmailselected') ? GETPOST('modelmailselected', 'int') : ($arraydefaultmessage->id > 0 ? $arraydefaultmessage->id : 0);

// If list of template is filled
$out .= '<div class="center" style="padding: 0px 0 12px 0">'."\n";
Expand Down

0 comments on commit cec9c65

Please sign in to comment.