I'm getting the error above on my site. It looks like line 57 should be changed as below because browscap_get_browser() returns an array rather than an object.

    if ($filter_crawlers) {
      $browser = browscap_get_browser();
 // if ($browser->crawler) {  
      if ($browser['crawler']) {
        $do_filtering = TRUE;
        $ignoring_because_crawler = TRUE;

Comments

frank ralf’s picture

Thanks for the feedback. Will have a look at it while upgrading the code to D7.

bohus ulrych’s picture

The PHP Notice in the Recent log messages still remains with the latest versions (Drupal 7.14; statistics_filter 7.x-1.0; browscap 7.x-1.3):
Notice: Trying to get property of non-object in statistics_filter_exit() (line 58 of .../modules/statistics_filter/statistics_filter.module).

Suggested solution posted by jzornig is working and should be implemented in new release of the module.

frank ralf’s picture

Version: 6.x-1.x-dev » 7.x-1.0
Assigned: Unassigned » frank ralf

Thanks for the feedback!

phiscock’s picture

Changing that line in 7.x-1.0 worked for me too.

thmnhat’s picture

Version: 7.x-1.0 » 7.x-1.1
Status: Active » Fixed

This is fixed in 7.x-1.1

Status: Fixed » Closed (fixed)

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