[ticket/12583] Redirect only on non-empty $message

PHPBB3-12583
This commit is contained in:
n-aleha 2014-05-25 22:00:37 +03:00
parent 7a6867d54e
commit 589ad564cc

View file

@ -316,10 +316,14 @@ class mcp_warn
{ {
$message = $user->lang['FORM_INVALID']; $message = $user->lang['FORM_INVALID'];
} }
if (!empty($message))
{
$redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=notes&mode=user_notes&u=$user_id"); $redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=notes&mode=user_notes&u=$user_id");
meta_refresh(2, $redirect); meta_refresh(2, $redirect);
trigger_error($message . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>')); trigger_error($message . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
} }
}
// OK, they didn't submit a warning so lets build the page for them to do so // OK, they didn't submit a warning so lets build the page for them to do so