Bugzilla – Attachment 81986 Details for
Bug 21771
Password recovery is broken (see 20023)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21771: (Follow-up) Revert the shift statement
Bug-21771-Follow-up-Revert-the-shift-statement.patch (text/plain), 1.24 KB, created by
Marcel de Rooy
on 2018-11-06 14:09:11 UTC
(
hide
)
Description:
Bug 21771: (Follow-up) Revert the shift statement
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-11-06 14:09:11 UTC
Size:
1.24 KB
patch
obsolete
>From 25467a1f66d083fa3c6997b2ffead81eb57defd9 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 6 Nov 2018 15:02:47 +0100 >Subject: [PATCH] Bug 21771: (Follow-up) Revert the shift statement >Content-Type: text/plain; charset=utf-8 > >Obviously you should never shift an items from an array if you need that >item later on :) > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Tested with entering userid as well as entering email.. >--- > opac/opac-password-recovery.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/opac/opac-password-recovery.pl b/opac/opac-password-recovery.pl >index 8a26147..2b39e52 100755 >--- a/opac/opac-password-recovery.pl >+++ b/opac/opac-password-recovery.pl >@@ -75,7 +75,8 @@ if ( $query->param('sendEmail') || $query->param('resendEmail') ) { > elsif ( $borrower = $search_results->next() ) { # One matching borrower > my @emails = grep { $_ } ( $borrower->email, $borrower->emailpro, $borrower->B_email ); > >- my $firstNonEmptyEmail = shift @emails; >+ my $firstNonEmptyEmail; >+ $firstNonEmptyEmail = $emails[0] if @emails; > > # Is the given email one of the borrower's ? > if ( $email && !( grep /^$email$/i, @emails ) ) { >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21771
:
81986
|
81987