ZF2 exception handler suppreses PHP parse errors

When producing a parse error, e.g. inside a Controller, ZF2 exception handler catches it and I only see

An error occurred during execution; please try again later.
No exception available

If I produce a parse error inside public/index.php I can see the plain PHP error in the browser, so PHP settings are correct.

How do I force ZF2 to show errors like this in dev mode?

Answers


Turns out I was using an old version of view/error/index.phtml (part of skeleton app) which was not prepared for errors of type Error (since PHP 7) and only handled errors of type Exception.

Had to change this line

<?php if(isset($this->exception) && $this->exception instanceof Exception): ?>

to this

<?php if (isset($this->exception) && ($this->exception instanceof \Exception || $this->exception instanceof \Error)) : ?>

Need Your Help

How to hold position of listboxitem when adding/removing items?

c# windows-phone-7 listbox scroll

I have a listbox which contains 20-50 items. All items must be sorted by unique id.

multithread server/client implementation in C

c multithreading tcp operating-system

I have just started learning basic networking concepts.I am trying to implement a multithread server-client prog in C.but the problem is instead of running multiple windows/terminals/instances for