mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-19 08:09:54 -04:00
Suppress errors when checking for readability of /proc/loadavg. Often this file will be protected by openbasedir, and is_readable will trigger an open basedir warning.
This commit is contained in:
@@ -70,7 +70,7 @@ class gallery_block_Core {
|
||||
$block->css_id = "g-platform";
|
||||
$block->title = t("Platform information");
|
||||
$block->content = new View("admin_block_platform.html");
|
||||
if (is_readable("/proc/loadavg")) {
|
||||
if (@is_readable("/proc/loadavg")) {
|
||||
$block->content->load_average =
|
||||
join(" ", array_slice(explode(" ", current(file("/proc/loadavg"))), 0, 3));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user