1
0
mirror of https://github.com/e107inc/e107.git synced 2025-06-04 18:06:58 +02:00

Fix PHP 8.0 fatal error in array sort in plugin log

```
[Mon Nov 30 03:41:56.019794 2020] [fcgid:warn] [pid 3259290:tid 140500652779264] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: PHP Fatal error:  Uncaught TypeError: array_multisort(): Argument #1 ($array) must be an array or a sort flag in ~/public_html/e107_plugins/log/stats.php:808
[Mon Nov 30 03:41:56.019853 2020] [fcgid:warn] [pid 3259290:tid 140500652779264] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: Stack trace:
[Mon Nov 30 03:41:56.019861 2020] [fcgid:warn] [pid 3259290:tid 140500652779264] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #0 ~/public_html/e107_plugins/log/stats.php(808): array_multisort()
[Mon Nov 30 03:41:56.019867 2020] [fcgid:warn] [pid 3259290:tid 140500652779264] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #1 ~/public_html/e107_plugins/log/stats.php(1620): siteStats->arraySort()
[Mon Nov 30 03:41:56.019885 2020] [fcgid:warn] [pid 3259290:tid 140500652779264] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #2 ~/public_html/e107_plugins/log/stats.php(194): siteStats->renderQueries()
[Mon Nov 30 03:41:56.019891 2020] [fcgid:warn] [pid 3259290:tid 140500652779264] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #3 {main}
[Mon Nov 30 03:41:56.019897 2020] [fcgid:warn] [pid 3259290:tid 140500652779264] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr:   thrown in ~/public_html/e107_plugins/log/stats.php on line 808
```
This commit is contained in:
Nick Liu 2020-11-30 12:58:06 +01:00
parent 05dbdb8625
commit 28ae48783f
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637

View File

@ -800,6 +800,7 @@ class siteStats
function arraySort($array, $column, $order = SORT_DESC)
{
$i=0;
$sortarr = array();
foreach($array as $info)
{
$sortarr[]=$info[$column];