zf-fr / zfr-rest

A module for Zend Framework 2 that aims to simplify RESTful
81 stars 31 forks source link

Mapping custom exceptions throws WARNING #203

Closed bartek75 closed 8 years ago

bartek75 commented 8 years ago

I mapped custom exception in 'zfr_rest_global.php' file 'exception_map' => [ 'Doctrine\DBAL\Exception\UniqueConstraintViolationException' => 'ZfrRest\Http\Exception\Client\ConflictException' ], Then a warning is issued by PHP and return code 200. PHP version 5.5.12, apache on windows.


< /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.0009139640{main}( )..\index.php:0
20.17675071888Zend\Mvc\Application->run( )..\index.php:21
30.541712193696Zend\EventManager\EventManager->trigger( ). .\Application.php:321
40.541712193768Zend\EventManager\EventManager->triggerListeners( )..\EventManager.php:205
50.542012195120call_user_func:{C:\git\4inspector\server\vendor\zendframework\zend-eventmanager\src\EventManager.php:444} ( )..\EventManager.php:444
60.542012195200Zend\Mvc\SendResponseListener->sendResponse( )..\EventManager.php:444
70.542012195912Zend\EventManager\EventManager->trigger( )..\SendResponseListener.php:94
80.542012196056Zend\EventManager\EventManager->triggerListeners( )..\EventManager.php:205
90.542312197608call_user_func:{C:\git\4inspector\server\vendor\zendframework\zend-eventmanager\src\EventManager.php:444} ( )..\EventManager.php:444
100.542312197672Zend\Mvc\ResponseSender\HttpResponseSender->__invoke( )..\EventManager.php:444
110.542312197760Zend\Mvc\ResponseSender\AbstractResponseSender->sendHeaders( )..\HttpResponseSender.php:46
120.543712253416header ( )..\AbstractResponseS ender.php:39
bartek75 commented 8 years ago

It is the problem with doctrine