[Catalyst-commits] r9149 -
Catalyst-Controller-DBIC-API/1.001/trunk/lib/Catalyst/Controller/DBIC/API
lukes at dev.catalyst.perl.org
lukes at dev.catalyst.perl.org
Fri Jan 30 17:17:43 GMT 2009
Author: lukes
Date: 2009-01-30 17:17:43 +0000 (Fri, 30 Jan 2009)
New Revision: 9149
Modified:
Catalyst-Controller-DBIC-API/1.001/trunk/lib/Catalyst/Controller/DBIC/API/REST.pm
Catalyst-Controller-DBIC-API/1.001/trunk/lib/Catalyst/Controller/DBIC/API/RPC.pm
Log:
object detaches if id is invalid
Modified: Catalyst-Controller-DBIC-API/1.001/trunk/lib/Catalyst/Controller/DBIC/API/REST.pm
===================================================================
--- Catalyst-Controller-DBIC-API/1.001/trunk/lib/Catalyst/Controller/DBIC/API/REST.pm 2009-01-30 14:39:05 UTC (rev 9148)
+++ Catalyst-Controller-DBIC-API/1.001/trunk/lib/Catalyst/Controller/DBIC/API/REST.pm 2009-01-30 17:17:43 UTC (rev 9149)
@@ -94,6 +94,7 @@
my $object = $c->stash->{$self->rs_stash_key}->find( $id );
unless ($object) {
$self->push_error($c, { message => "Invalid id" });
+ $c->detach; # no point continuing
}
$c->stash->{$self->object_stash_key} = $object;
}
Modified: Catalyst-Controller-DBIC-API/1.001/trunk/lib/Catalyst/Controller/DBIC/API/RPC.pm
===================================================================
--- Catalyst-Controller-DBIC-API/1.001/trunk/lib/Catalyst/Controller/DBIC/API/RPC.pm 2009-01-30 14:39:05 UTC (rev 9148)
+++ Catalyst-Controller-DBIC-API/1.001/trunk/lib/Catalyst/Controller/DBIC/API/RPC.pm 2009-01-30 17:17:43 UTC (rev 9149)
@@ -106,6 +106,7 @@
my $object = $c->stash->{$self->rs_stash_key}->find( $id );
unless ($object) {
$self->push_error($c, { message => "Invalid id" });
+ $c->detach; # no point continuing
}
$c->stash->{$self->object_stash_key} = $object;
More information about the Catalyst-commits
mailing list