projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67c1624
)
Eine Funtion zur Überprüfung der Existenz von hash-basierten Funktionsparameter.
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 11 Oct 2007 11:35:49 +0000
(11:35 +0000)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 11 Oct 2007 11:35:49 +0000
(11:35 +0000)
SL/Common.pm
patch
|
blob
|
history
diff --git
a/SL/Common.pm
b/SL/Common.pm
index
43b9aaa
..
9d7cdcb
100644
(file)
--- 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;