X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/dfd2c90eb39f3b6727933f2985df1111c6109ab5..84e1c3e5742e8bf3e64b8265497dc4844bb03ccc:/SL/Controller/Base.pm diff --git a/SL/Controller/Base.pm b/SL/Controller/Base.pm index d50d519b7..152fbb779 100644 --- a/SL/Controller/Base.pm +++ b/SL/Controller/Base.pm @@ -174,9 +174,13 @@ sub _dispatch { my $action = first { $::form->{"action_${_}"} } @actions; my $sub = "action_${action}"; - $self->_run_hooks('before', $action); - $self->$sub(@_); - $self->_run_hooks('after', $action); + if ($self->can($sub)) { + $self->_run_hooks('before', $action); + $self->$sub(@_); + $self->_run_hooks('after', $action); + } else { + $::form->error($::locale->text('Oops. No valid action found to dispatch. Please report this case to the Lx-Office team.')); + } } sub _template_obj {