Skip to content

Silenced error detection not working correctly #1050

Description

@alexander-schranz

We have basically default installation of sentry in our symfony application, currently the following sentry packages installed

sentry/sdk: 2.1.0
sentry/sentry: 2.4.0 
sentry/sentry-symfony:3.5.1

Sentry is running on its default configuration we just have the dsn configured:

sentry:
      dsn: "%env(SENTRY_DSN)%"

But we still get the following errors the following sentry errors:

Sentry\Exception\FatalErrorException
Compile Warning: Unterminated comment starting line 41
/vendor/phpcr/phpcr-migrations/lib/MigratorUtil.php at line 41

            // Read entire lines to prevent keyword truncation
            for ($line = 0; $line <= 20; $line++) {
                $buffer .= fgets($fp);
            }
            $tokens = @token_get_all($buffer); // this is line 41 which fails
Screenshot Bildschirmfoto 2020-07-16 um 15 57 39

as we don't have capture_silenced_errors activated this error should not appear.

What is strange that it is detected as FatalErrorException and if I look at the current code here, it should be a SilencedErrorException so it is not logged, so maybe there is the error but I'm not sure.

The code throwing this warning is basically very simple: token_get_all("<?php /*");.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions