hook_seckit_alter() check for valid DSN broken

Created on 7 November 2024, 5 months ago

Problem/Motivation

The dblog is flooded with messages like:

Notice: Undefined index: server in raven_seckit_options_alter() (line 485 of /var/www/drupal7/projects/raven-7.x-3.22/raven.module).
Notice: Undefined index: public_key in raven_seckit_options_alter() (line 478 of /var/www/drupal7/projects/raven-7.x-3.22/raven.module).

Steps to reproduce

Have raven enabled and configured to not have a public DSN (e.g. drush vset raven_public_dsn ''). Then enable seckit and open any page. Look at the logs.

Proposed resolution

The check in the hook implementation only catches exceptions and assumes we’ve got a valid DSN if there are none. Raven_Client::parseDSN() (in version 1.x of sentry-php) however returns an empty array for any falsy input. Thus the check fails.

This was caused by commit 83b7103 in #3117849.

Remaining tasks

Change the code again to check for falsy return values of Raven_Client::parseDSN().

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡¦πŸ‡ΉAustria torotil

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024