Bug 17246: Do no support arrayref to define multiple FK
[koha_ffzg] / C4 / Letters.pm
index a981e8a..3ff39b1 100644 (file)
@@ -1570,10 +1570,7 @@ sub _get_tt_params {
                     $object = $module->search( { $pk => $tables->{$table} } )->next();
                 }
                 else {                                  # Params are mutliple foreign keys
-                    my @values = @{ $tables->{$table} };
-                    my @keys   = @{ $config->{$table}->{fk} };
-                    my %params = map { $_ => shift(@values) } @keys;
-                    $object = $module->search( \%params )->next();
+                    croak "Multiple foreign keys (table $table) should be passed using an hashref";
                 }
                 $params->{ $config->{$table}->{singular} } = $object;
             }