From: Jakub Vrana Date: Sun, 28 Apr 2013 15:12:21 +0000 (-0700) Subject: Save memory in get_file() X-Git-Tag: v3.7.0~27 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=7f05141b89bb8ff9409eff3b3ebf32cbc9e45deb;p=adminer.git Save memory in get_file() --- diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index ade083f3..872ed506 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -595,7 +595,7 @@ function get_file($key, $decompress = false) { foreach ($file as $key => $val) { $file[$key] = (array) $val; } - $return = array(); + $return = ''; foreach ($file["error"] as $key => $error) { if ($error) { return $error; @@ -614,10 +614,10 @@ function get_file($key, $decompress = false) { $content = substr($content, 3); } } - $return[] = $content; + $return .= $content . "\n\n"; } //! support SQL files not ending with semicolon - return implode("\n\n\n", $return); + return $return; } /** Determine upload error