Skip to content

Commit 46db7c7

Browse files
committed
Correct logic check for Windows compatibility related to sys_getload_avg function
1 parent 367ca27 commit 46db7c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DOFileCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function get($key)
119119
return false;
120120
}
121121

122-
if (!function_exists('sys_getloadavg')) {
122+
if (!function_exists('sys_getloadavg') && $this->config['unixLoadUpperThreshold'] !== -1) {
123123
throw new Exception('Your PHP installation does not support `sys_getloadavg` (Windows?). Please set `unixLoadUpperThreshold` to `-1` in your DOFileCache config.');
124124
}
125125

0 commit comments

Comments
 (0)