Commit d92d53ad authored by mark burdett's avatar mark burdett
Browse files

Issue #3321670 by mfb: Don't throw TypeError if public_dsn is null

parent 0d0fd47f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -409,8 +409,12 @@ function raven_seckit_options_alter(&$options) {
  if (!class_exists(Dsn::class)) {
    return;
  }
  $dsn = empty($_SERVER['SENTRY_DSN']) ? variable_get('raven_public_dsn') : $_SERVER['SENTRY_DSN'];
  if (NULL === $dsn) {
    return;
  }
  try {
    $dsn = Dsn::createFromString(empty($_SERVER['SENTRY_DSN']) ? variable_get('raven_public_dsn') : $_SERVER['SENTRY_DSN']);
    $dsn = Dsn::createFromString($dsn);
  }
  catch (InvalidArgumentException $e) {
    // Raven is incorrectly configured.