Support > cpg1.6 upgrading

Errors running "Overal stats" under PHP 8.0

(1/1)

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:
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

--- Code: ---        $pid = 0;
--- End code ---
to

--- Code: ---        $pid = '';
--- End code ---

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

--- Code: ---        $pid = 0;
--- End code ---
to

--- Code: ---        $pid = '';
--- End code ---

--- End quote ---

Yes it fixed the issue.
Thanks

Navigation

[0] Message Index

Go to full version