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

TypeError not reported by Sentry using defaults #1590

Closed
socialpresencenetwork opened this issue Oct 5, 2023 · 3 comments
Closed

TypeError not reported by Sentry using defaults #1590

socialpresencenetwork opened this issue Oct 5, 2023 · 3 comments

Comments

@socialpresencenetwork
Copy link

socialpresencenetwork commented Oct 5, 2023

How do you use Sentry?

Sentry SaaS (sentry.io)

SDK version

3.18.2

Steps to reproduce

<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

require './vendor/autoload.php';
\Sentry\init([
    'dsn' => 'DSN GOES HERE',
    'sample_rate' => 1,
]);

class a {
    public function test()
    {
        $this->foo = new stdClass();
         // Throws an uncaught TypeError
        $this->foo->tags = array_diff($this->foo->tags, []);
    }
}

$a = new a();
$a->test();

php.ini also has error reporting as such:
error_reporting = E_ALL

Expected result

Expected result is an entry in the Sentry SaaS platform.

Actual result

No exception/error entry is added and the problem goes unnoticed.

@Jean85
Copy link
Collaborator

Jean85 commented Oct 6, 2023

Confirmation that the snippet produces a type error (but also a warning, and a deprecation under 8.2): https://3v4l.org/3MhoR

@cleptric
Copy link
Member

cleptric commented Oct 9, 2023

I'm not able to reproduce the issue you're seeing.
Executing your script hails two issues in Sentry for me.

@getsantry
Copy link

getsantry bot commented Oct 31, 2023

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

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

No branches or pull requests

3 participants