[FrameworkBundle] added a safeguard for infinite loops on some Windows configurations
This commit is contained in:
parent
839cb027a6
commit
1babf3c7a1
@ -36,8 +36,12 @@ class ExceptionController extends ContainerAware
|
||||
{
|
||||
$this->container->get('request')->setRequestFormat($format);
|
||||
|
||||
// the count variable avoids an infinite loop on
|
||||
// some Windows configurations where ob_get_level()
|
||||
// never reaches 0
|
||||
$count = 100;
|
||||
$currentContent = '';
|
||||
while (ob_get_level()) {
|
||||
while (ob_get_level() && --$count) {
|
||||
$currentContent .= ob_get_clean();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user