Bug 15585: Remove "shift on reference is experimental" warning
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 22 Mar 2016 11:04:41 +0000 (11:04 +0000)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Tue, 22 Mar 2016 23:08:21 +0000 (23:08 +0000)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
t/db_dependent/Passwordrecovery.t

index 9a3b8b2..92cdf4b 100755 (executable)
@@ -134,7 +134,7 @@ ok( Koha::Patron::Password::Recovery::CompletePasswordRecovery($uuid2) == 0, "[C
 # Koha::Patron::Password::Recovery::SendPasswordRecoveryEmail #
 ###############################################################
 
-my $borrower = shift [ Koha::Patrons->search( { userid => $userid1 } ) ];
+my $borrower = Koha::Patrons->search( { userid => $userid1 } )->next;
 ok( Koha::Patron::Password::Recovery::SendPasswordRecoveryEmail($borrower, $email1, 0) == 1, "[SendPasswordRecoveryEmail] Returns 1 on success" );
 my $letters = C4::Letters::GetQueuedMessages( { borrowernumber => $borrowernumber1, limit => 99 } );
 ok( scalar @$letters == 1, "[SendPasswordRecoveryEmail] There is a letter in the queue for our borrower");