Correction with redirection and array_key_exists