[open-ils-commits] [GIT] Evergreen ILS branch master updated. 80d5c4a4c7e81a7b5739befdd5a621a70d42d5f0

Evergreen Git git at git.evergreen-ils.org
Wed Oct 19 18:28:00 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  80d5c4a4c7e81a7b5739befdd5a621a70d42d5f0 (commit)
      from  2119df527e881f81b6ce4d8ed3fef71c247a1cd2 (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 80d5c4a4c7e81a7b5739befdd5a621a70d42d5f0
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Wed Oct 19 18:16:14 2011 -0400

    TPAC: avoid problem with HOLD_EXISTS event in hold placement
    
    If you place a hold on something that generates a HOLD_EXISTS event (and
    no other events?) you get a 500 error from Apache and an error in the
    logs saying "not a hash reference" about $result in the lines I've
    changed here.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index a532bff..59bc862 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -695,7 +695,13 @@ sub load_place_hold {
                 } else {
                     # hold-specific failure event 
                     $hdata->{hold_failed} = 1;
-                    $hdata->{hold_failed_event} = $result->{last_event};
+
+                    if (ref $result eq 'HASH') {
+                        $hdata->{hold_failed_event} = $result->{last_event};
+                    } elsif (ref $result eq 'ARRAY') {
+                        $hdata->{hold_failed_event} = pop @$result;
+                    }
+
                     $hdata->{could_override} = $self->test_could_override($hdata->{hold_failed_event});
                 }
             }

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

Summary of changes:
 .../lib/OpenILS/WWW/EGCatLoader/Account.pm         |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list