Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Issue #236: Error Duplication #240

Merged
merged 2 commits into from
Aug 2, 2017

Conversation

ArturMoczulski
Copy link
Contributor

This fixes uncaught exceptions being reported twice as per issue #236

Ready for review

src/Rollbar.php Outdated
in_array($last_error['type'], self::$fatalErrors, true) &&
// don't log uncaught exceptions as they were handled by exceptionHandler()
isset($last_error['message']) &&
strpos($last_error['message'], 'Uncaught exception') !== 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The !== 0 should be !== false because strpos can return 0 if that is the start of the string, but returns false exactly to indicate not found.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see what you are doing, the logic is a bit off for having two ands because you want to log the fatal if message is not set also

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. @rokob thanks for keeping your eyes open though

Change condition for what defines an uncaught exception
@rokob rokob merged commit 58dbd99 into rollbar:master Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants