Upgrade to OJS 3.1.2.3 - Statistics >> Editorial - Generate PHP Fatal error?

Hi,
I just upgraded to OJS version 3.1.2-3 and I got this PHP error when clicked on “Statistics > Editorial” .

[Tue Dec 03 14:49:16.112618 2019] [php7:error] [pid 12788] [client 10.25.8.2:50678] PHP Fatal error: Uncaught TypeError: Argument 1 passed to PKP\Statistics\SubmissionStatistics::__construct() must be an instance of PKP\Statistics\object, instance of stdClass given, called in /var/www/ojs/lib/pkp/classes/services/EditorialStatisticsService.inc.php on line 75 and defined in /var/www/ojs/lib/pkp/classes/statistics/SubmissionStatistics.inc.php:27\nStack trace:\n#0 /var/www/ojs/lib/pkp/classes/services/EditorialStatisticsService.inc.php(75): PKP\Statistics\SubmissionStatistics->__construct(Object(stdClass))\n#1 /var/www/ojs/lib/pkp/pages/stats/PKPStatsHandler.inc.php(225): PKP\Services\EditorialStatisticsService->getSubmissionStatistics(1)\n#2 /var/www/ojs/lib/pkp/classes/core/PKPRouter.inc.php(390): PKPStatsHandler->editorialReport(Array, Object(Request))\n#5
/var/www/ojs/lib/pkp/classes/core/PKPPageRouter.inc.php(231): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, fa in /var/www/ojs/lib/pkp/classes/statistics/SubmissionStatistics.inc.php on line 27, referer: http://xxx.xxx.xxx.ca/index.php/jms/management/tools

Please help.
thanks

Hi @Ptran,

You should be able to resolve this by applying this change:

It’s a minor change, but it looks like some versions of PHP (yours at least) treat it as a fatal error. Please confirm if that gets it going!

(It appears that this area of the code needs some work – we’ll take a look over it and release another build shortly.)

Thanks,
Alec Smecher
Public Knowledge Project Team

I applied the change above, but still get the same error:

[Tue Dec 03 16:20:47.554305 2019] [php7:error] [pid 15283] [client 10.25.8.2:54480] PHP Fatal error: Uncaught TypeError: Argument 1 passed to PKP\Statistics\SubmissionStatistics::__construct() must be an instance of PKP\Statistics\object, instance of stdClass given, called in /var/www/ojs/lib/pkp/classes/services/EditorialStatisticsService.inc.php on line 75 and defined in /var/www/ojs/lib/pkp/classes/statistics/SubmissionStatistics.inc.php:27\nStack trace:\n#0 /var/www/ojs/lib/pkp/classes/services/EditorialStatisticsService.inc.php(75): PKP\Statistics\SubmissionStatistics->__construct(Object(stdClass))\n#1 /var/www/ojs/lib/pkp/pages/stats/PKPStatsHandler.inc.php(225): PKP\Services\EditorialStatisticsService->getSubmissionStatistics(1)\n#2 /var/www/ojs/lib/pkp/classes/core/PKPRouter.inc.php(390): PKPStatsHandler->editorialReport(Array, Object(Request))\n#3 /var/www/ojs/lib/pkp/classes/core/PKPPageRouter.inc.php(231): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Arr /var/www/ojs/lib/pkp/classes/statistics/SubmissionStatistics.inc.php on line 27, referer: http://xxx.xxx.ca/index.php/cjur/management/tools

thanks

Hi @Ptran,

Hmm, thanks, I’ve filed the issue for further attention at https://github.com/pkp/pkp-lib/issues/5322 – please watch for an update there.

Regards,
Alec Smecher
Public Knowledge Project Team

Wonderful !! It fixed the problem. Great team!
Thanks so much for all the supports. My donation is on the way.

Regards,
-P

1 Like