[open-ils-commits] [GIT] Evergreen ILS branch rel_3_0 updated. 582fd4dfb03a5843fcb21b6201668799f7fdc1b8
Evergreen Git
git at git.evergreen-ils.org
Mon Nov 20 12:28:29 EST 2017
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, rel_3_0 has been updated
via 582fd4dfb03a5843fcb21b6201668799f7fdc1b8 (commit)
from 1566db97d03d7662d606e5b982b523ccd7db3e3a (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 582fd4dfb03a5843fcb21b6201668799f7fdc1b8
Author: Jason Stephenson <jason at sigio.com>
Date: Thu Jun 15 14:11:41 2017 -0400
LP 1698176: Return undef with die event in Actor.pm _add_patron function.
If the CStoreEditor create_actor_user call fails in the _add_patron
helper function in OpenILS/Application/Actor.pm, the CStorEditor's
die_event is returned as a scalar value. The caller expects a list
return with two values: the user object in index 0 and the event, if
any, in index 1.
Returning just the event causes the caller to use the event as if it
were the user object. This leads to a different error message later
in the code: Can't call method "billing_address" on unblessed
reference at /path/to/perlib/OpenILS/Application/Actor.pm line 743.
This commit changes the return value in the event of a database insert
failure to be the two member list as expected by the caller with undef
in index 0 and the die_event in index 1. This returns the proper
error message to the client.
Signed-off-by: Jason Stephenson <jason at sigio.com>
Signed-off-by: Cesar Velez <cesar.velez at equinoxinitiative.org>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
index 6cc2e8b..ef90fdb 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
@@ -591,7 +591,7 @@ sub _add_patron {
# do a dance to get the password hashed securely
my $saved_password = $patron->passwd;
$patron->passwd('');
- $e->create_actor_user($patron) or return $e->die_event;
+ $e->create_actor_user($patron) or return (undef, $e->die_event);
modify_migrated_user_password($e, $patron->id, $saved_password);
my $id = $patron->id; # added by CStoreEditor
-----------------------------------------------------------------------
Summary of changes:
.../src/perlmods/lib/OpenILS/Application/Actor.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list