From: miker Date: Tue, 11 Mar 2008 17:27:41 +0000 (+0000) Subject: only test type if we have an object X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e7ce99069a3a5358ac2f4fc2030ecf4490392b4a;p=Evergreen.git only test type if we have an object git-svn-id: svn://svn.open-ils.org/ILS/trunk@8972 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm b/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm index f21f8ddb2a..883d9fd930 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm @@ -62,7 +62,7 @@ sub CRUD_action_object_permcheck { my $e = new_editor(authtoken => $auth, xact => 1); return $e->event unless $e->checkauth; - unless ($obj->json_hint eq $self->{class_hint}) { + if (ref($obj) && $obj->json_hint ne $self->{class_hint}) { throw OpenSRF::DomainObject::oilsException->new( statusCode => 500, status => "Class missmatch: $self->{class_hint} method called with " . $obj->json_hint,