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:
Andy Staudacher
2010-02-08 13:05:18 -08:00
parent f9d00aa742
commit f9377bcbd3

View File

@@ -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 {