Notice: Undefined index: HTTP_REFERER in statistics_exit() (line 83 of /DRUPAL7/modules/statistics/statistics.module).

I'm thinking that maybe FF6 isn't supplying referrer data. Just a guess, but my logs are getting filled up with this silly php notice.

Any reason not to do:

        'url' => (issset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '',
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bfroehle’s picture

Version: 7.x-dev » 8.x-dev
Status: Active » Needs review
Issue tags: +Novice, +Needs backport to D7
FileSize
584 bytes

Yes, we should use the isset($_SERVER['HTTP_REFERER']) ? ... pattern, just like in watchdog().

karschsp’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies to both 7.x and 8.x. RTBC.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x and 8.x. Thanks.

mgifford’s picture

Excellent. @bfroehle thanks for rolling up the patch. @Dries thanks & wish I was able to hang out in the code sprint after DrupalCon.

Automatically closed -- issue fixed for 2 weeks with no activity.