summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_block.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-06-07 05:11:09 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-06-07 05:11:09 -0700
commit4a6775f5d34d1f26eac7e7c70e12c54cf2d330ec (patch)
treeda5285eb79ce80e2d134ec8f6a7f6cc9530656a5 /modules/gallery/helpers/gallery_block.php
parent097ef934c6fe188cc368905ee72b7cca6ad2f755 (diff)
parent1d91e1b2dc8456681f9e38baaca1d191cff1ac7a (diff)
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/gallery/helpers/gallery_block.php')
-rw-r--r--modules/gallery/helpers/gallery_block.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php
index 08ce21b7..cb28cbcd 100644
--- a/modules/gallery/helpers/gallery_block.php
+++ b/modules/gallery/helpers/gallery_block.php
@@ -70,9 +70,9 @@ 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") && $first_line = current(@file("/proc/loadavg"))) {
$block->content->load_average =
- join(" ", array_slice(explode(" ", current(file("/proc/loadavg"))), 0, 3));
+ join(" ", array_slice(explode(" ", $first_line), 0, 3));
} else {
$block->content->load_average = t("Unavailable");
}