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

Exceptions, thrown in templates not showing #157

Closed
thexpand opened this issue Jun 9, 2016 · 5 comments
Closed

Exceptions, thrown in templates not showing #157

thexpand opened this issue Jun 9, 2016 · 5 comments

Comments

@thexpand
Copy link
Contributor

thexpand commented Jun 9, 2016

Since release-2.7.8 there is a problem when an error occurs in the template (even a syntax or parse error). The framework says that an error occurred and "No exception is available".
Sometimes it is frustrating, because I can't even see on which line is the error. I am using the latest PHP7 version (v7.0.7) on Ubuntu 16.10.

@zf2timo
Copy link

zf2timo commented Jun 9, 2016

Maybe this is related to #146

@kokspflanze
Copy link
Contributor

kokspflanze commented Jun 9, 2016

hi,

i reproduce the problem, form my site it looks like that in your error template is a check like

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

the problem is that the $this->exception is from class Error.

so change it to smth like that

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

hope i can help you.

about #146 this result in http error code 500 with a error in your webserver logs.

Tested on PHP 7.0.7 CentOS 7

@thexpand
Copy link
Contributor Author

thexpand commented Jun 9, 2016

I don't have any checks in my templates. I'm just calling a method on a non-object. I don't get an error - instead, I get the message: "No exception available" and I have to debug every single line.

@weierophinney
Copy link
Member

@thexpand It looks like it's solved in #153; I'll be merging later today and issuing a release.

@thexpand
Copy link
Contributor Author

thexpand commented Jun 9, 2016

It's working like a charm! Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants