]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/Controller/Base.pm
create_unique_session_value hat immer falsch auf Eindeutigkeit der Nummer geprüft
[kivitendo-erp.git] / SL / Controller / Base.pm
index d50d519b71733c31c2c10d5759b1d52ed953b673..152fbb779e3a85699d0ecc4049698321c9451ef6 100644 (file)
@@ -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 {