Details
-
Improvement
-
Resolution: Unresolved
-
Medium
-
None
-
2011.10, 4.6.0beta1
-
None
Description
Currently ezpRestMvcController::createResult does catch any unknown exception generated by custom actions - which is good, as actions might be developed by 3rd party, and we never should trust them.
The problem happens when eZP is set to display warnings and other non fatal errors - in such case, if a warning is generated while executing a REST action, it will end up as part of the response, thus breaking the response (expected response format being json most of the time, I guess).
It would be a good idea to use ob_start or similar techniques to prevent the rest action to generate any output that would end up directly onscreen.