]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Common.pm
Eine Funktion zur Überprüfung der Existens von Funktionsparametern hinzugefügt, wenn...
[mfinanz.git] / SL / Common.pm
index 2aedb6f81d25ddfb42dbfff9df2482ac642d1dee..43b9aaab7e5c1f550e67b03d3c402b40a8aaffbe 100644 (file)
@@ -435,4 +435,15 @@ sub save_email_status {
   $main::lxdebug->leave_sub();
 }
 
+sub check_params {
+  my $params = shift;
+
+  foreach my $key (@_) {
+    if (!defined $params->{$key}) {
+      my $subroutine = (caller(1))[3];
+      $main::form->error($main::locale->text("Missing parameter #1 in call to sub #2.", $key, $subroutine));
+    }
+  }
+}
+
 1;