Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
be04c437
Commit
be04c437
authored
Mar 27, 2011
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed CS
parent
1320b7ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
src/Silex/GetResponseForErrorEvent.php
src/Silex/GetResponseForErrorEvent.php
+1
-1
src/Silex/StringResponseConverter.php
src/Silex/StringResponseConverter.php
+5
-4
No files found.
src/Silex/GetResponseForErrorEvent.php
View file @
be04c437
...
@@ -29,4 +29,4 @@ class GetResponseForErrorEvent extends GetResponseForExceptionEvent
...
@@ -29,4 +29,4 @@ class GetResponseForErrorEvent extends GetResponseForExceptionEvent
$converter
=
new
StringResponseConverter
();
$converter
=
new
StringResponseConverter
();
$this
->
setResponse
(
$converter
->
convert
(
$response
));
$this
->
setResponse
(
$converter
->
convert
(
$response
));
}
}
}
}
\ No newline at end of file
src/Silex/StringResponseConverter.php
View file @
be04c437
...
@@ -23,15 +23,16 @@ class StringResponseConverter
...
@@ -23,15 +23,16 @@ class StringResponseConverter
/**
/**
* Does the conversion
* Does the conversion
*
*
* @param $response The response string
* @param $response The response string
*
* @return A response object
* @return A response object
*/
*/
public
function
convert
(
$response
)
public
function
convert
(
$response
)
{
{
if
(
!
$response
instanceof
Response
)
{
if
(
!
$response
instanceof
Response
)
{
return
new
Response
((
string
)
$response
);
return
new
Response
((
string
)
$response
);
}
else
{
return
$response
;
}
}
return
$response
;
}
}
}
}
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