Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/serverinfo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorn-pat <33984944+n-pat@users.noreply.github.com>2018-12-12 21:44:16 +0300
committerPatrick Neumann <patrick@neuma-nn.de>2018-12-12 21:53:20 +0300
commit65162da3046c1c79f4dadd4ba89d297de3f73772 (patch)
tree5bc1c3c63f4919b23b99481e668a43579b17fdeb /lib
parent257d9d60cde78211f6a5b1e21f9bf45bab9b3746 (diff)
Suppress error-log-entries og is_readable call
Hello, this might not be a good change as it seems to supress all error messages. Though it helps me running Nextcloud on a provider that gives me limited access to open_basedir or /proc/meminfo. Although you check for access, I still get lots of errors-log-entries when opening the Memory-System-Statistics: ``` is_readable(): open_basedir restriction in effect. File(/proc/meminfo) is not within the allowed path(s): (/var/www/vhosts/xxx.yyy.netcup.net/httpdocs/zzz.aaa.com/:/tmp/:/var/lib/php5/sessions:/var/www/vhosts/xxx.yyy.netcup.net/tmp) at /var/www/vhosts/xxx.yyy.netcup.net/httpdocs/zzz.aaa.com/apps/serverinfo/lib/SystemStatistics.php#96 ``` Just as an idea, perhaps you guys have a better approach. Good work! :-) Patrick
Diffstat (limited to 'lib')
-rw-r--r--lib/SystemStatistics.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/SystemStatistics.php b/lib/SystemStatistics.php
index 8bd7620..159858a 100644
--- a/lib/SystemStatistics.php
+++ b/lib/SystemStatistics.php
@@ -94,7 +94,7 @@ class SystemStatistics {
*/
protected function getMemoryUsage() {
$memoryUsage = false;
- if (is_readable('/proc/meminfo')) {
+ if (@is_readable('/proc/meminfo')) {
// read meminfo from OS
$memoryUsage = file_get_contents('/proc/meminfo');
}