If the statistics_filter_log is set, at line 87 of statistics_filter.module the variable $browser is set with $_SERVER['HTTP_USER_AGENT']), but if the HTTP_USER_AGENT is undefined (and it can happen...), the following database insert at line 90 causes an integrity constraint violation because it tries to insert a null value.
My suggestion is to replace line 87 with the following code:
$browser = (isset($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : 'Undefined';

Comments

  • thmnhat committed d4e91f7 on 7.x-1.x
    Issue #2123941: HTTP_USER_AGENT is undefined
    
thmnhat’s picture

Assigned: Unassigned » thmnhat
Issue summary: View changes
Status: Active » Fixed

Status: Fixed » Closed (fixed)

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