Error of UsageState plugin


We have error of usageStats, how can it danger? Full text of error from error_log:

[Sun Sep 10 14:09:18.501438 2017] [:error] [pid 25960] [client] ojs2 has produced an error\n Message: WARNING: in_array() expects parameter 2 to be array, null given\n
In file: /www/home/jbpe/htdocs/plugins/generic/usageStats/\n At line: 190\n
Stacktrace: \n File: (unknown) line (unknown)\n
Function: PKPApplication->errorHandler(2, “in_array() expects parameter 2 to be array, null given”, “/www/home/jbpe/htdocs/plugins/generic/usageStats/”, 190, Array(27))\n
File: /www/home/jbpe/htdocs/plugins/generic/usageStats/ line 190\n
Function: in_array(“city”, Null)\n File: /www/home/jbpe/htdocs/lib/pkp/classes/task/ line 155\n Function: UsageStatsLoader->processFile("/www/home/jbpe/htdocs/files/usageStats/processing/usage_events_20170909.log", Null)\n
File: /www/home/jbpe/htdocs/plugins/generic/usageStats/ line 128\n
Function: FileLoader->executeActions()\n
File: /www/home/jbpe/htdocs/lib/pkp/classes/scheduledTask/ line 150\n
Function: UsageStatsLoader->executeActions()\n
File: /www/home/jbpe/htdocs/plugins/generic/acron/ line 255\n
Function: ScheduledTask->execute()\n File: (unknown) line (unknown)\n
Function: AcronPlugin->shutdownFunction()\n Server info:\n OS: Linux\n PHP Version: 5.4.16\n
Apache Version: Apache/2.4.6 (CentOS) mpm-itk/2.4.7-01 OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 PHP/5.4.16\n
DB Driver: mysql\n DB server version: 5.5.47-MariaDB-log

Hi @smorenov

Which OJS version are you using? – Please always include this information.

How are your plugin settings for city and region?
Do you have the setting ‘optionalColumns’ in your DB table plugin_settings where plugin_name = ‘usagestatsplugin’? If so, what is its setting_value?


Hi, @bozana

Version 2.4.8-1, sorry, I forgot.

City and region don’t change, becouse “DO NOT CHANGE unless you fully understand what you’re doing.”

Yes, I find that setting, but its value NULL. Journal ID is 0, is that rigth?


And I copy log of plugin from ScheduledTaskLogs:
[2017-09-11 14:12:51] [Notice] Task process started.
[2017-09-11 14:12:53] [Notice] File /www/home/jbpe/htdocs/files/usageStats/processing/usage_events_20170910.log was processed and archived.
[2017-09-11 14:12:53] [Notice] Task process stopped.

Best regards,
S. Morenov

Hi @smorenov

Yes, OK, that all looks fine. – That seems to be just a warning and your log files seem to be processed successfully – at least the scheduled task log that you posted says so. – Are all old log files in the folder archive?
I will see to fix that warning…