From 28457c35ed853a81b9b74a94367b8d069ba2ab35 Mon Sep 17 00:00:00 2001 From: Artur Date: Tue, 9 Nov 2021 13:34:16 +0100 Subject: Update PhpStatistics.php Line 71 commented and replaced below with line 72. Based on https://help.nextcloud.com/t/20-0-1-errors-phpstatistics-opcache-get-status-has-been-disabled-for-security-reasons/97231/7 and well known issue "Return value of OCA\ServerInfo\PhpStatistics::getOPcacheStatus() must be of the type array, null returned" --- lib/PhpStatistics.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PhpStatistics.php b/lib/PhpStatistics.php index a4c5d8d..62e9a2d 100644 --- a/lib/PhpStatistics.php +++ b/lib/PhpStatistics.php @@ -68,7 +68,8 @@ class PhpStatistics { } // get status information about the cache - $status = opcache_get_status(false); + //$status = opcache_get_status(false); + $status = (function_exists('opcache_get_status')) ? opcache_get_status(false) : false; if ($status === false) { // no array, returning back empty array to prevent any errors on JS side. -- cgit v1.2.3 From 9c4e5b88f54cfb790135e5ac8867529239986a39 Mon Sep 17 00:00:00 2001 From: Artur Date: Fri, 21 Jan 2022 11:25:39 +0100 Subject: Sesolving DCO issue for commit Signed-off-by: Artur --- lib/PhpStatistics.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpStatistics.php b/lib/PhpStatistics.php index 62e9a2d..4e60571 100644 --- a/lib/PhpStatistics.php +++ b/lib/PhpStatistics.php @@ -68,7 +68,7 @@ class PhpStatistics { } // get status information about the cache - //$status = opcache_get_status(false); + // $status = opcache_get_status(false); $status = (function_exists('opcache_get_status')) ? opcache_get_status(false) : false; if ($status === false) { -- cgit v1.2.3 From 8ba8bb36cf6b7715bec49b8af763641b1a3899f9 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Thu, 31 Mar 2022 17:21:10 +0200 Subject: Update lib/PhpStatistics.php --- lib/PhpStatistics.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/PhpStatistics.php b/lib/PhpStatistics.php index 4e60571..2f32f3d 100644 --- a/lib/PhpStatistics.php +++ b/lib/PhpStatistics.php @@ -68,7 +68,6 @@ class PhpStatistics { } // get status information about the cache - // $status = opcache_get_status(false); $status = (function_exists('opcache_get_status')) ? opcache_get_status(false) : false; if ($status === false) { -- cgit v1.2.3