[open-ils-commits] [GIT] Evergreen ILS branch master updated. 67a9cbcf7e20bd3711a7d207fa47fe4f68fe2e7d

Evergreen Git git at git.evergreen-ils.org
Tue Oct 11 10:17:53 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  67a9cbcf7e20bd3711a7d207fa47fe4f68fe2e7d (commit)
      from  2e0f3937a7053f25560c79daead9e008d108d5d2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 67a9cbcf7e20bd3711a7d207fa47fe4f68fe2e7d
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Sep 7 02:41:43 2011 -0400

    Protect against undefined value as ARRAY reference
    
    We should not assume that the caller is going to supply an array
    (empty or not) of addresses or cards in the input values for the
    open-ils.actor.patron.update method.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
index ebb56a1..ad6fabc 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
@@ -669,7 +669,9 @@ sub _add_update_addresses {
 
 	my $current_id; # id of the address before creation
 
-	for my $address (@{$patron->addresses()}) {
+	my $addresses = $patron->addresses();
+
+	for my $address (@$addresses) {
 
 		next unless ref $address;
 		$current_id = $address->id();
@@ -779,7 +781,9 @@ sub _add_update_cards {
 	my $evt;
 
 	my $virtual_id; #id of the card before creation
-	for my $card (@{$patron->cards()}) {
+
+	my $cards = $patron->cards();
+	for my $card (@$cards) {
 
 		$card->usr($new_patron->id());
 

-----------------------------------------------------------------------

Summary of changes:
 .../src/perlmods/lib/OpenILS/Application/Actor.pm  |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list