Bug in usageStats plugin 2.4.8.3

I noticed that running manually the usageStats I was getting lots of repeated errors:

ojs2 has produced an error
  Message: WARNING: in_array() expects parameter 2 to be array, null given
  In file: /usr/home/seer/public_html/plugins/generic/usageStats/UsageStatsLoader.inc.php
  At line: 190
  Stacktrace:
  Server info:
   OS: FreeBSD
   PHP Version: 5.6.38
   Apache Version: N/A
   DB Driver: mysql
   DB server version: 5.7.26-log
ojs2 has produced an error
  Message: WARNING: in_array() expects parameter 2 to be array, null given
  In file: /usr/home/seer/public_html/plugins/generic/usageStats/UsageStatsLoader.inc.php
  At line: 191
  Stacktrace:
  Server info:
   OS: FreeBSD
   PHP Version: 5.6.38
   Apache Version: N/A
   DB Driver: mysql
   DB server version: 5.7.26-log

It seems to be because I haven’t set to generate statistics for City and Region, and thus the array that should contain what options are set is null instead of empty.

Hi, @luizborges. These warnings are informational only, and will not affect your processing.

Most development effort is now focused on the 3.x version, but I’ve filed an issue and pull request to cleanup this warning here:

If you test out this fix, please comment on the issue regarding success or any other problems.

Tested, it is working just fine.