Errors running "Overal stats" under PHP 8.0 Errors running "Overal stats" under PHP 8.0
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Errors running "Overal stats" under PHP 8.0

Started by altenae, October 04, 2021, 12:19:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

altenae

When running overall stats under PHP 8.0 I see the following error which I can't fix:

Fatal error: Uncaught TypeError: array_multisort(): Argument #1 ($array) must be an array or a sort flag in stats.inc.php (243
Also on line 326.

Code on 243 stats.inc.php

array_multisort($osResultArray,SORT_DESC);
$osTotal = array_sum($osResultArray);

and

stat_details.php(326): individualStatsByOS(0, 'hits', '100%') #2 {main} thrown in stat_details.php

Code on 326 in the stat_details.php

individualStatsByOS($pid,$type,$statsTableWidth);
individualStatsByBrowser($pid,$type,$statsTableWidth);


Anyone an idea ?

ron4mac

#1
Thank you for providing feedback and discovering the error situation(s).

Corrections will be made in a day or two and be included in an updated version (1.6.14).

altenae

I have replaced the files from the CPG 1.6.14 package.
No errors but the stats page is totally empty.
Tried this before upgrading to PHP 8.0 and before it worked correctly (lot of stats information)

Any thing else I am missing ?

ron4mac

For now, make the change below. Work will be scheduled in this area at a later time for the next release.

In file stat_details.php, change line 39 from
        $pid = 0;
to
        $pid = '';

altenae

Quote from: ron4mac on October 05, 2021, 06:46:28 PM
For now, make the change below. Work will be scheduled in this area at a later time for the next release.

In file stat_details.php, change line 39 from
        $pid = 0;
to
        $pid = '';

Yes it fixed the issue.
Thanks