From 6ccea47689a953faf3cc611e2014a8a34c360a0a Mon Sep 17 00:00:00 2001 From: Martin Helmling Date: Fri, 9 Oct 2015 11:05:12 +0200 Subject: [PATCH] Request: Dateiupload in form arrays[] gefixt MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit _recode_recursively hatte die Weiche für Dateiupload nur bei Hashzugriff, und hat im Array-Kontext die Daten überschrieben. --- SL/Request.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/Request.pm b/SL/Request.pm index 37009218e..f72694d1c 100644 --- a/SL/Request.pm +++ b/SL/Request.pm @@ -251,7 +251,7 @@ sub _recode_recursively { # Workaround for a bug: converting $from->[$idx] directly # leads to 'undef'. I don't know why. Converting a copy works, # though. - $to->[$idx] = $iconv->convert("" . $from->[$idx]); + $to->[$idx] = $iconv->convert("" . $from->[$idx]) if defined $from->[$idx] && !defined $to->[$idx]; } else { $to->[$idx] ||= {} if 'HASH' eq ref $from->[$idx]; $to->[$idx] ||= [] if 'ARRAY' eq ref $from->[$idx]; -- 2.20.1