Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit cf0c971

Browse files
committed
Merge branch 'hotfix/153' into release-2.7
Close #153 Fixes #146
2 parents f27c1a5 + 21a754f commit cf0c971

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ All notable changes to this project will be documented in this file, in reverse
3636
- [#149](https://github.com/zendframework/zend-mvc/pull/149) and
3737
[#158](https://github.com/zendframework/zend-mvc/pull/158) fix an "undefined
3838
variable" issue with `Zend\Mvc\Service\DiAbstractServiceFactoryFactory`.
39+
- [#153](https://github.com/zendframework/zend-mvc/pull/153) removes the
40+
typehint from the `$exception` argument of `DispatchListener::marshalBadControllerEvent()`,
41+
fixing an issue when PHP 7 Error types are caught and passed to the method.
3942

4043
## 2.7.8 - 2016-05-31
4144

src/DispatchListener.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,18 +232,16 @@ protected function marshallControllerNotFoundEvent(
232232
/**
233233
* Marshal a bad controller exception event
234234
*
235+
* @todo Update $exception typehint to "Throwable" once PHP 7 requirement
236+
* is enforced
235237
* @param string $controllerName
236238
* @param MvcEvent $event
237239
* @param Application $application
238-
* @param \Exception $exception
240+
* @param \Exception|\Throwable $exception
239241
* @return mixed
240242
*/
241-
protected function marshalBadControllerEvent(
242-
$controllerName,
243-
MvcEvent $event,
244-
Application $application,
245-
\Exception $exception
246-
) {
243+
protected function marshalBadControllerEvent($controllerName, MvcEvent $event, Application $application, $exception)
244+
{
247245
$event->setName(MvcEvent::EVENT_DISPATCH_ERROR);
248246
$event->setError($application::ERROR_EXCEPTION);
249247
$event->setController($controllerName);

0 commit comments

Comments
 (0)