8000 Capturing E_ERROR fatal errors broken on PHP 7 · Issue #552 · getsentry/sentry-php · GitHub
[go: up one dir, main page]

Ski 10000 p to content
Capturing E_ERROR fatal errors broken on PHP 7 #552
Closed
ChristophWurst/nextcloud_sentry
#18
@stayallive

Description

@stayallive

As commented by @mfb on #514:

What are you all doing to capture fatal PHP errors, such as allowed memory size exhausted? To capture this fatal error successfully, I had to comment out the return FALSE; in shouldCaptureFatalError():

if (PHP_VERSION_ID >= 70000 && $type === E_ERROR) {
  // return false;
}

sample code:

<?php
include '../vendor/autoload.php';
$client = new Raven_Client('...');
$client->install();
while (TRUE) {
  $a[] = 11111111111;
}

It seems like this does prevent those errors from being reporting, however removing that seems to bring us back to the original issue causing 2 reports for the same error, likely caused by

which causes the following error in my PHP 7.2 installation:

Parse error: syntax error, unexpected '}' in /private/var/www/sentry-php/error.php on line 5

Fatal error: Exception thrown without a stack frame in Unknown on line 0

Which are both reported, which is ofcourse incorrect.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0