From 46db7c711c4c283710854bad5187134f55d73198 Mon Sep 17 00:00:00 2001 From: Jordan Hall Date: Fri, 9 Nov 2018 22:38:06 +0000 Subject: [PATCH] Correct logic check for Windows compatibility related to sys_getload_avg function --- src/DOFileCache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DOFileCache.php b/src/DOFileCache.php index 1c08f48..af8231c 100644 --- a/src/DOFileCache.php +++ b/src/DOFileCache.php @@ -119,7 +119,7 @@ public function get($key) return false; } - if (!function_exists('sys_getloadavg')) { + if (!function_exists('sys_getloadavg') && $this->config['unixLoadUpperThreshold'] !== -1) { throw new Exception('Your PHP installation does not support `sys_getloadavg` (Windows?). Please set `unixLoadUpperThreshold` to `-1` in your DOFileCache config.'); }