I'm using the filter to filter out some events before sending them to Sentry. For local development I have not set a DSN and in case of warning I'm getting the following fatal error:
Fatal error: Uncaught Error: Call to a member function getOptions() on null
in /var/www/web/content/plugins/wp-sentry/src/class-wp-sentry-php-tracker.php on line 104
Stack
WP_Sentry_Php_Tracker::on_after_setup_theme()
wp-includes/class-wp-hook.php:307
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:331
WP_Hook::do_action()
wp-includes/plugin.php:476
do_action()
wp-settings.php:576
require_once()
wp-config.php:101
require_once()
wp-load.php:55
require_once()
wp-admin/admin.php:34
require_once()
wp-admin/index.php:10
Of course, I could just disable the plugin but I think it would be nice if such errors are prevented by checking if the client is actually set. Thoughts?
I'm using the filter to filter out some events before sending them to Sentry. For local development I have not set a DSN and in case of warning I'm getting the following fatal error:
https://github.com/stayallive/wp-sentry/blob/e697fe5b28ddc014c358e9c0738d95e597e274af/src/class-wp-sentry-php-tracker.php#L102-L106
Of course, I could just disable the plugin but I think it would be nice if such errors are prevented by checking if the client is actually set. Thoughts?