mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-06 16:53:34 +02:00
Move sending headers before the flush, fixes #1746
There was Warning: Cannot modify header information - headers already sent in action.php on line 228 see https://piwigo.org/forum/viewtopic.php?id=32254 Unclear how headers could had been sent before sending headers, but..
This commit is contained in:
committed by
Pierrick Le Gall
parent
a87242f9c2
commit
18ad3bf90c
+5
-5
@@ -216,6 +216,11 @@ if (ini_get('safe_mode') == 0)
|
||||
@set_time_limit(0);
|
||||
}
|
||||
|
||||
foreach ($http_headers as $header)
|
||||
{
|
||||
header( $header );
|
||||
}
|
||||
|
||||
// Without clean and flush there may be some image download problems, or image can be corrupted after download
|
||||
if (ob_get_length() !== FALSE)
|
||||
{
|
||||
@@ -223,11 +228,6 @@ if (ob_get_length() !== FALSE)
|
||||
}
|
||||
flush();
|
||||
|
||||
foreach ($http_headers as $header)
|
||||
{
|
||||
header( $header );
|
||||
}
|
||||
|
||||
@readfile($file);
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user