From 49189bfbc05f517ff1c91c05f99f59cf35c9e383 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 11 Oct 2007 11:35:49 +0000 Subject: [PATCH] =?utf8?q?Eine=20Funtion=20zur=20=C3=9Cberpr=C3=BCfung=20d?= =?utf8?q?er=20Existenz=20von=20hash-basierten=20Funktionsparameter.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Common.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SL/Common.pm b/SL/Common.pm index 43b9aaab7..9d7cdcbcc 100644 --- a/SL/Common.pm +++ b/SL/Common.pm @@ -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; -- 2.20.1