1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-13 18:14:07 +02:00

Fix gzip export (fixes #896)

This commit is contained in:
Jakub Vrana
2025-03-10 18:51:28 +01:00
parent bb23546478
commit f8b2640156
3 changed files with 5 additions and 10 deletions

View File

@@ -937,7 +937,10 @@ class Adminer {
($ext == "sql" || $output != "file" ? "text/plain" : "text/csv") . "; charset=utf-8"
)));
if ($output == "gz") {
ob_start('ob_gzencode', 1e6);
ob_start(function ($string) {
// ob_start() callback receives an optional parameter $phase but gzencode() accepts optional parameter $level
return gzencode($string);
}, 1e6);
}
return $ext;
}