Handling undocumented return value of a boolean false
authorAlexander Ebert <ebert@woltlab.com>
Sat, 27 Jul 2013 17:44:47 +0000 (19:44 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 27 Jul 2013 17:44:47 +0000 (19:44 +0200)
wcfsetup/install/files/lib/acp/page/IndexPage.class.php

index 0c279ad7e65e90728d5ccb506f9f1ee7ae1153a4..8dfed1ae752ca54e846e227560c41f4c9117a63a 100755 (executable)
@@ -43,7 +43,9 @@ class IndexPage extends AbstractPage {
                // get load
                if (function_exists('sys_getloadavg')) {
                        $load = sys_getloadavg();
-                       $this->server['load'] = implode(', ', $load);
+                       if (is_array($load) && count($load) == 3) {
+                               $this->server['load'] = implode(', ', $load);
+                       }
                }
        }