Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
8dbe2d1a
Commit
8dbe2d1a
authored
Aug 13, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #681 from bencorlett/develop
Added Output Buffering
parents
feb651f6
7f0d709b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
core.php
laravel/core.php
+14
-0
redirect.php
laravel/redirect.php
+19
-0
No files found.
laravel/core.php
View file @
8dbe2d1a
...
@@ -17,6 +17,20 @@ define('BLADE_EXT', '.blade.php');
...
@@ -17,6 +17,20 @@ define('BLADE_EXT', '.blade.php');
define
(
'DEFAULT_BUNDLE'
,
'application'
);
define
(
'DEFAULT_BUNDLE'
,
'application'
);
define
(
'MB_STRING'
,
(
int
)
function_exists
(
'mb_get_info'
));
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
| Require Core Classes
...
...
laravel/redirect.php
View file @
8dbe2d1a
...
@@ -165,4 +165,23 @@ class Redirect extends Response {
...
@@ -165,4 +165,23 @@ class Redirect extends Response {
return
$this
->
with
(
'errors'
,
$errors
);
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
();
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment