diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
-rw-r--r-- | phpBB/includes/session.php | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index c6143196c2..35b6d45e8d 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -90,6 +90,7 @@ <li>[Fix] Made the compress_tar class tolerate archives that do not properly have their archived contents listed (Bug #14429 / thanks to JRSweets for his patch)</li> <li>[Fix] Moved topics should not count towards the number of topics in a forum (Bug #14648 / thanks to Schumi for his patch)</li> <li>[Fix] Properly check for invalid characters in MySQL DB prefixes during install (Bug #18775)</li> + <li>[Change] Generalize load check (Bug #21255 / thanks to Xipher)</li> </ul> <a name="v300"></a><h3>1.ii. Changes since 3.0.0</h3> diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index da54a6c512..08f6512424 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -217,9 +217,9 @@ class session // Load limit check (if applicable) if ($config['limit_load'] || $config['limit_search_load']) { - if ($load = @file_get_contents('/proc/loadavg')) + if ((function_exists('sys_getloadavg') && $load = sys_getloadavg()) || ($load = explode(' ', @file_get_contents('/proc/loadavg')))) { - $this->load = array_slice(explode(' ', $load), 0, 1); + $this->load = array_slice($load, 0, 1); $this->load = floatval($this->load[0]); } else |