commit
8dbe2d1a9a
|
@ -17,6 +17,20 @@
|
|||
define('DEFAULT_BUNDLE', 'application');
|
||||
define('MB_STRING', (int) function_exists('mb_get_info'));
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Start Output Buffering
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Output buffering allows us to capture all output at any time, so that we
|
||||
| can discard it or treat it accordingly. An example of this is if you have
|
||||
| echoed a string, but want to return a Redirect object. Because Symfony
|
||||
| only checks if headers have been sent, your redirect just silently fails.
|
||||
|
|
||||
*/
|
||||
|
||||
ob_start('mb_output_handler');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Require Core Classes
|
||||
|
|
|
@ -165,4 +165,23 @@ public function with_errors($container)
|
|||
return $this->with('errors', $errors);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the headers and content of the response to the browser.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function send()
|
||||
{
|
||||
// Dump all output buffering, this ensures
|
||||
// that symphony will send our redirect headers
|
||||
// properly if we've outputted any content from
|
||||
// within Laravel.
|
||||
while (ob_get_level() > 0)
|
||||
{
|
||||
ob_end_clean();
|
||||
}
|
||||
|
||||
return parent::send();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue