Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Errors running "Overal stats" under PHP 8.0  (Read 5503 times)

0 Members and 1 Guest are viewing this topic.

altenae

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 254
Errors running "Overal stats" under PHP 8.0
« on: October 04, 2021, 12:19:19 pm »

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 ?
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Errors running "Overal stats" under PHP 8.0
« Reply #1 on: October 04, 2021, 01:26:46 pm »

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).
« Last Edit: October 04, 2021, 09:13:27 pm by ron4mac »
Logged

altenae

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 254
Re: Errors running "Overal stats" under PHP 8.0
« Reply #2 on: October 05, 2021, 02:26:57 pm »

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 ?
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Errors running "Overal stats" under PHP 8.0
« Reply #3 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: [Select]
        $pid = 0;to
Code: [Select]
        $pid = '';
Logged

altenae

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 254
Re: Errors running "Overal stats" under PHP 8.0
« Reply #4 on: October 05, 2021, 07:10:52 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: [Select]
        $pid = 0;to
Code: [Select]
        $pid = '';

Yes it fixed the issue.
Thanks
Logged
Pages: [1]   Go Up
 

Page created in 0.031 seconds with 20 queries.