[Rt-commit] rt branch, 4.2/fix-principal-load-in-memberships-page, created. rt-4.1.6-276-g9749bfe

? sunnavy sunnavy at bestpractical.com
Wed Feb 20 06:16:38 EST 2013


The branch, 4.2/fix-principal-load-in-memberships-page has been created
        at  9749bfec9a23a1db6ea43c3670ffb91a9c7c9da4 (commit)

- Log -----------------------------------------------------------------
commit 9749bfec9a23a1db6ea43c3670ffb91a9c7c9da4
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Feb 20 19:18:14 2013 +0800

    RT::Principal::Load doesn't return false on failure, need to check ->id after that

diff --git a/share/html/Admin/Elements/MembershipsPage b/share/html/Admin/Elements/MembershipsPage
index e6d8829..4877e4b 100644
--- a/share/html/Admin/Elements/MembershipsPage
+++ b/share/html/Admin/Elements/MembershipsPage
@@ -86,7 +86,8 @@
 
 <%INIT>
 my $principal = RT::Principal->new( $session{'CurrentUser'} );
-$principal->Load( $id ) || Abort(loc("Couldn't load principal #[_1]", $id));
+$principal->Load( $id );
+Abort(loc("Couldn't load principal #[_1]", $id)) unless $principal->id;
 
 my $object = $principal->Object;
 $id = $object->id;

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


More information about the Rt-commit mailing list