Comments (13)
I believe this might be related to #47, and will have to be addressed. I'll focus on this very very soon.
Thanks for the report! 😄
from whoops.
I'm having some trouble reproducing this one locally; can you provide (if you still have it) the code you were using to cause this issue, and your PHP version?
Cheers!
from whoops.
PHP Version: 5.4.5-1~dotdeb.0
Code to reproduce: https://gist.github.com/rjkip/fa4cfbfbb5fbf5927d75
It appears the bug appears only with the PrettyPageHandler
. The JsonResponseHandler
outputs this:
{"error":{"type":"Whoops\\Exception\\ErrorException","message":"syntax error, unexpected '}'","file":"\/home\/rkip\/sites\/whoops\/public\/syntax-error.php","line":3}}
While the PrettyPageHandler
shows this:
from whoops.
I'm having the same issue, running PHP 5.3.3-7+squeeze14.
The issue seems to be related to the following line.
If I were to change the line to the following, it seems to work:
if(false && this->exception instanceof ErrorException && empty($frames[1]['line'])) {
but I assume that will probably break something else.
from whoops.
To clarify things, this happens with any kind of error, e.g. while trying to access a protected property.
from whoops.
I was to able to fix it by specifying a new method getFrameFromError
in Inspector tailored to ErrorException.
See attached. The line however is still reported incorrectly... I suppose further adjustments are needed. @filp please have a look and I can send a Pull request if this looks good.
from whoops.
Merged #56, could you guys, if at all possible, verify if it fixes the situation for your specific scenarios? Hopefully it should be a clean fix, but it may need some further adjustments.
Thanks a ton, @softius, and everyone else who helped 😄
from whoops.
Fix confirmed at my end. Thanks a lot!
from whoops.
How come there's no "real" stack trace from trapping an ErrorException
? I'm having to disable the error-hander temporarily to find out where an error is occurring...
from whoops.
@mindplay-dk, I am unable to reproduce your problem, I have a full stack.
What's your Whoops version, what particular error are you trying to trap?
Try with the latest (master) branch of Whoops as well.
Set "filp/whoops": "@dev"
in your composer.json
file for that.
from whoops.
I'm using the last tagged release 1.0.10 with PHP 5.3.8 under Windows.
ErrorException
never has a stack trace, at least I've never seen one yet - it doesn't matter which type of warning or notice was trapped.
Might give the master
a try tomorrow...
from whoops.
Also try and see if there's anything wrong with your PHP, see if the following outputs a correct traceback:
function foo(){
throw new \ErrorException();
}
try {
foo();
} catch (\Exception $e) {
echo $e->getTraceAsString();
}
from whoops.
Yep, this no longer occurs with master
.
from whoops.
Related Issues (20)
- Trying to get in touch regarding a security issue HOT 1
- Occasional errors with zlib.output_compression = On HOT 1
- Catch php.ini warnings HOT 2
- Getting PHP Parse error when running the package in PHP 5.6.40 version HOT 6
- A way to add extra information HOT 4
- 2.14.4 Contains syntax not compatible with PHP ^5.5.9 HOT 2
- Adding an additional member variable and getter to PrettyPageHandler HOT 1
- Paystack_public_key
- Search logos HOT 3
- ArrayAccess Return Type issue HOT 1
- Is it able to run with swoole? HOT 1
- How to get exception? HOT 1
- E_NOTICE & E_WARNING just showing as plain text HOT 1
- PrettyPageHandler: make first frame with comments active on page load HOT 5
- Current line highlight does not work HOT 1
- Bug report. HOT 3
- PHP Fatal error: Uncaught Error: Call to a member function getFrameFilters() on null in vendor/filp/whoops/src/Whoops/Handler/PlainTextHandler.php:285 HOT 2
- Whoops \ Exception \ ErrorException (E_WARNING) Undefined variable $configuration
- PrettyPageHandler to html not working HOT 1
- Links in frame comments not legible (WCAG AA)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whoops.