Description
Marc Véron
2016-06-10 12:47:58 UTC
Created attachment 52225 [details] [review] Bug 16707: Software Error in OPAC password recovery when leaving form fields empty This patch fixes a software Error in OPAC password recovery when leaving form fields empty To reproduce: - Set syspref OpacResetPassword to "Allow" - Go to OPAC - Click link "Forgot your password? - On the following screen "Forgotten password recovery", do not fill in form fields, click "Submit" Result: Software error: Can't use an undefined value as an ARRAY reference at /usr/share/kohaclone/opac/opac-password-recovery.pl line 66. To test: - Apply patch - Verify that the error no longer occurs Created attachment 52252 [details] [review] [SIGNED-OFF]Bug 16707: Software Error in OPAC password recovery when leaving form fields empty This patch fixes a software Error in OPAC password recovery when leaving form fields empty To reproduce: - Set syspref OpacResetPassword to "Allow" - Go to OPAC - Click link "Forgot your password? - On the following screen "Forgotten password recovery", do not fill in form fields, click "Submit" Result: Software error: Can't use an undefined value as an ARRAY reference at /usr/share/kohaclone/opac/opac-password-recovery.pl line 66. To test: - Apply patch - Verify that the error no longer occurs Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Work as expected. NO QA Test Tool errors Created attachment 52259 [details] [review] Bug 16707: Fix software error in OPAC password recovery when leaving form fields empty The $search_results is considered as an arrayref but is not defined if no patron matches the recovery infos. Test plan: - Set syspref OpacResetPassword to "Allow" - Go to OPAC - Click link "Forgot your password? - On the following screen "Forgotten password recovery", do not fill in form fields, click "Submit" => Without this patch you got the software error => With this patch apply, you will get "No account was found with the provided information." Marc, the eval is a bit weird here. Please have a look at my counter patch. Created attachment 52276 [details] [review] Bug 16707: Fix software error in OPAC password recovery when leaving form fields empty The $search_results is considered as an arrayref but is not defined if no patron matches the recovery infos. Test plan: - Set syspref OpacResetPassword to "Allow" - Go to OPAC - Click link "Forgot your password? - On the following screen "Forgotten password recovery", do not fill in form fields, click "Submit" => Without this patch you got the software error => With this patch apply, you will get "No account was found with the provided information." Sign-off on counter patch. Signed-off-by: Marc Véron <veron@veron.ch> Created attachment 52495 [details] [review] Bug 16707: Fix software error in OPAC password recovery when leaving form fields empty The $search_results is considered as an arrayref but is not defined if no patron matches the recovery infos. Test plan: - Set syspref OpacResetPassword to "Allow" - Go to OPAC - Click link "Forgot your password? - On the following screen "Forgotten password recovery", do not fill in form fields, click "Submit" => Without this patch you got the software error => With this patch apply, you will get "No account was found with the provided information." Sign-off on counter patch. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master for 16.11, thanks Jonathan! Pushed in 16.05. Will be in 16.05.02. Not needed in 3.22.x |