diff --git a/forms/module.php b/forms/module.php index f2ba08d..0a3b723 100644 --- a/forms/module.php +++ b/forms/module.php @@ -152,7 +152,7 @@ break; } - if ($_REQUEST['ajax']) - exit((string)$response); + if ($_REQUEST['ajax'] ?? false) + exit((string)$response); } ?> \ No newline at end of file diff --git a/forms/templates/form_edit.tpl b/forms/templates/form_edit.tpl index 1668815..3708712 100644 --- a/forms/templates/form_edit.tpl +++ b/forms/templates/form_edit.tpl @@ -90,8 +90,8 @@ $fid = parseInt('{$fid}'); $sess = '{$sess}'; $smarty = new Array; -$smarty['start_alert'] = '{$alert.text}'; -$smarty['start_alert_theme'] = '{$alert.theme}'; +$smarty['start_alert'] = '{$alert.text|default:''}'; +$smarty['start_alert_theme'] = '{$alert.theme|default:''}'; $smarty['_email_accept'] = '{#email_accept#}'; $smarty['_email_error'] = '{#email_error#}'; $smarty['tpl_dir'] = '{$tpl_dir}'; @@ -134,7 +134,7 @@ $smarty['form_title_error_title'] = '{#form_title_error_title#}';