Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throwing exception with double newline causes PHP Warning and return code 200 #205

Open
bartek75 opened this issue Mar 28, 2016 · 0 comments

Comments

@bartek75
Copy link

Example:
throw new \ZfrRest\Http\Exception\Client\ConflictException("UniqueConstraintViolationException\n\n ss");
in controller causes:

< HTTP/1.1 200 OK
< Date: Mon, 28 Mar 2016 18:21:56 GMT
< Server: Apache/2.4.9 (Win32) PHP/5.5.12
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: POST, GET, PUT, OPTIONS, PATCH, DELETE
< Access-Control-Allow-Headers: X-Accept-Charset,X-Accept,Content-Type,app,key
< X-Powered-By: PHP/5.5.12
< Content-Length: 5736
< Content-Type: application/json


< /tr> < /tr>
( ! ) Warning: Header may not contain more than a single header, new line detected in C:\git\4inspector\server\vendor\zendframework\zend-mvc\src\ResponseSender\AbstractResponseSender.ph p on line 39
Call Stack
#TimeMemoryFunctionLocation
10.0007139640{main}( )..\index.php:0
20.14315071928Zend\Mvc\Application->run( )..\index.php:21
30.473312107616Zend\EventManager\EventManager->trigger( ). .\Application.php:321
40.473312107688Zend\EventManager\EventManager->triggerListeners( )..\EventManager.php:205
50.473512109040call_user_func:{C:\git\4inspector\server\vendor\zendframework\zend-eventmanager\src\EventManager.php:444} ( )..\EventManager.php:444
60.473512109120Zend\Mvc\SendResponseListener->sendResponse( )..\EventManager.php:444
70.473612109832Zend\EventManager\EventManager->trigger( )..\SendResponseListener.php:94
80.473612109976Zend\EventManager\EventManager->triggerListeners( )..\EventManager.php:205
90.473812111528call_user_func:{C:\git\4inspector\server\vendor\zendframework\zend-eventmanager\src\EventManager.php:444} ( )..\EventManager.php:444
100.473812111592Zend\Mvc\ResponseSender\HttpResponseSender->__invoke( )..\EventManager.php:444
110.473812111680Zend\Mvc\ResponseSender\AbstractResponseSender->sendHeaders( )..\HttpResponseSender.php:46
120.474712166976header ( )..\AbstractResponseS ender.php:39
{"status_code":409,"message":"UniqueConstraintViolationException\n\n ss"}\* Connection #0 to host left intact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant