on invalid proceed method in call to editSave, warn and recover rather than run time error

This commit is contained in:
Scott Walters 2012-10-27 01:59:18 -04:00
parent 59ce3b3fd6
commit 9a45ff4b91
3 changed files with 37 additions and 3 deletions

View file

@ -3162,9 +3162,14 @@ sub www_editSave {
elsif ($proceed ne "") {
my $method = "www_".$session->form->process("proceed");
$session->asset($object);
return $session->asset->$method();
if( $session->asset->can($method) ) {
return $session->asset->$method();
}
else {
$session->log->warn("proceed method of $method specified but that method doesn't exist in " . ref($session->asset));
# else fall through to the default handling below
}
}
$session->asset($object->getContainer);
return $session->asset->www_view;
}