Permalink
Browse files

Save memory in get_file()

  • Loading branch information...
1 parent d513de4 commit 7f05141b89bb8ff9409eff3b3ebf32cbc9e45deb @vrana committed Apr 28, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 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

0 comments on commit 7f05141

Please sign in to comment.