Minor - fixing PHP warning.
Avoid redirection see BT7419
Minor - format code.