aboutsummaryrefslogtreecommitdiffstats
path: root/packages/lcdproc/lcdproc.inc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2008-01-31 09:18:47 +0000
committerSeth Mos <seth.mos@xs4all.nl>2008-01-31 09:18:47 +0000
commit8cf6e7fc03af4eb1aeca5622e50f91f94f425498 (patch)
tree7707024b5b59ebc6e017e2670050943e9b8d7316 /packages/lcdproc/lcdproc.inc
parent07b2984653d7d0f1c445703ff931bb15fb03a52e (diff)
downloadpfsense-packages-8cf6e7fc03af4eb1aeca5622e50f91f94f425498.tar.gz
pfsense-packages-8cf6e7fc03af4eb1aeca5622e50f91f94f425498.tar.bz2
pfsense-packages-8cf6e7fc03af4eb1aeca5622e50f91f94f425498.zip
Handle emtpy screens config section
Diffstat (limited to 'packages/lcdproc/lcdproc.inc')
-rw-r--r--packages/lcdproc/lcdproc.inc32
1 files changed, 17 insertions, 15 deletions
diff --git a/packages/lcdproc/lcdproc.inc b/packages/lcdproc/lcdproc.inc
index 4aff2ca0..d95dce84 100644
--- a/packages/lcdproc/lcdproc.inc
+++ b/packages/lcdproc/lcdproc.inc
@@ -245,21 +245,23 @@
/* generate rc file start and stop */
$options = "";
- foreach($lcdproc_screens_config as $name => $screen) {
- if($screen == "on") {
- switch($name) {
- case "scr_cpu":
- $options .= "P ";
- break;
- case "scr_time":
- $options .= "O ";
- break;
- case "scr_load":
- $options .= "L ";
- break;
- case "scr_uptime":
- $options .= "U ";
- break;
+ if(is_array($lcdproc_screens_config)) {
+ foreach($lcdproc_screens_config as $name => $screen) {
+ if($screen == "on") {
+ switch($name) {
+ case "scr_cpu":
+ $options .= "P ";
+ break;
+ case "scr_time":
+ $options .= "O ";
+ break;
+ case "scr_load":
+ $options .= "L ";
+ break;
+ case "scr_uptime":
+ $options .= "U ";
+ break;
+ }
}
}
}