hwi/HWIOAuthBundle — pull request #596 by mranawake (2014-06-30 18:41:42+00:00)
Title: Update ConnectController.php

Problem: When you are in a connect confirmation type page with a registration form (URL: /connect/registration/{key}), it renders fine. However if the user refresh the page for any reason it will throw a 500 error because it full fills line # 103 requirement.

Reason: This is because the error session variable is suffixed with the timestamp (Eg: "_hwi_oauth.registration_error.$key"). When you refresh the page, at line # 100 & # 101 refers to a session variable with the {key} from URL, while the real variable is has a different name (set at line # 134).

Solution: Refer to a uniform error session variable. Drop the uniqueness of the variable by removing the appended $key value. This will change line # 59, # 100, # 101 & # 134. This session variable is not referred anywhere in the project but this controller file. Looks like it is safe to change the variable name. I made this change in my local project and work without any issues.

Thanks.