Skip to content

Commit

Permalink
Fix Dolibarr#16420 - undefined $model_mail_selected_id
Browse files Browse the repository at this point in the history
Set $model_mail_selected_id to 0 when it is undefined
  • Loading branch information
daraelmin authored Feb 26, 2021
1 parent e08bfab commit 5d31a93
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 @@ -455,7 +455,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) ? $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 5d31a93

Please sign in to comment.