Fix PHP location checks (was it left unfinished?!)