added missing support for the new output API in PHP 5.4+
This commit is contained in:
parent
484c7533bd
commit
1a73b44df0
@ -321,9 +321,17 @@ class Response
|
|||||||
$obStatus = ob_get_status(1);
|
$obStatus = ob_get_status(1);
|
||||||
while (($level = ob_get_level()) > 0 && $level !== $previous) {
|
while (($level = ob_get_level()) > 0 && $level !== $previous) {
|
||||||
$previous = $level;
|
$previous = $level;
|
||||||
if ($obStatus[$level - 1] && isset($obStatus[$level - 1]['del']) && $obStatus[$level - 1]['del']) {
|
if ($obStatus[$level - 1]) {
|
||||||
|
if (version_compare(PHP_VERSION, '5.4', '>=')) {
|
||||||
|
if (isset($obStatus[$level - 1]['flags']) && ($obStatus[$level - 1]['flags'] & PHP_OUTPUT_HANDLER_REMOVABLE)) {
|
||||||
ob_end_flush();
|
ob_end_flush();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (isset($obStatus[$level - 1]['del']) && $obStatus[$level - 1]['del']) {
|
||||||
|
ob_end_flush();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
flush();
|
flush();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user