Author: necrohem
Description:
Applies to:
protected function tryRespondLastModified( ResourceLoaderContext $context, $mtime )
The function is small, so I'll let the code speak for itself. Basically, in the existing version the value retuned by ob_get_level() will count down as $i counts up - this results in only half of the ob levels getting cleared. Ultimately, this leads to bytes in the body section of the 304 (which is illegal and chokes browsers).
Here is the existing code:
for ( $i = 0; $i < ob_get_level(); $i++ ) {
ob_end_clean();
}
Here is what it should be:
$tmp = ob_get_level();
for ( $i = 0; $i < $tmp; $i++ ) {
ob_end_clean();
}
Version: 1.19.1
Severity: major