From: Moritz Bunkus Date: Wed, 12 Jan 2011 14:59:12 +0000 (+0100) Subject: Bessere Parameterüberprüfung X-Git-Tag: release-2.6.3~61^2~7^2~1^2~2^2~96 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f203aa21ad0ff71285b354e5565b7a0ba275dc88;p=kivitendo-erp.git Bessere Parameterüberprüfung --- diff --git a/SL/DB/Helper/LinkedRecords.pm b/SL/DB/Helper/LinkedRecords.pm index 05f29a540..c1d31338b 100644 --- a/SL/DB/Helper/LinkedRecords.pm +++ b/SL/DB/Helper/LinkedRecords.pm @@ -14,7 +14,7 @@ sub linked_records { my %params = @_; my $wanted = $params{direction} || croak("Missing parameter `direction'"); - my $myself = $wanted eq 'from' ? 'to' : 'from'; + my $myself = $wanted eq 'from' ? 'to' : $wanted eq 'to' ? 'from' : croak("Invalid parameter `direction'"); my $my_table = SL::DB::Helpers::Mappings::get_table_for_package(ref($self));