]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Common.pm
Eine Funtion zur Überprüfung der Existenz von hash-basierten Funktionsparameter.
[mfinanz.git] / SL / Common.pm
index 43b9aaab7e5c1f550e67b03d3c402b40a8aaffbe..9d7cdcbccd088ca37b8ac1b293fbfdcadc96d1cd 100644 (file)
@@ -446,4 +446,15 @@ sub check_params {
   }
 }
 
+sub check_params_x {
+  my $params = shift;
+
+  foreach my $key (@_) {
+    if (!exists $params->{$key}) {
+      my $subroutine = (caller(1))[3];
+      $main::form->error($main::locale->text("Missing parameter #1 in call to sub #2.", $key, $subroutine));
+    }
+  }
+}
+
 1;