mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
is_executable() doesn't exist in PHP/Win < 5.0.0
This commit is contained in:
parent
edfc5b5ce1
commit
b86e6ba918
@ -5708,7 +5708,7 @@ function get_performance_info() {
|
||||
if (is_readable('/proc/loadavg') && $loadavg = @file('/proc/loadavg')) {
|
||||
list($server_load) = explode(' ', $loadavg[0]);
|
||||
unset($loadavg);
|
||||
} else if ( is_executable('/usr/bin/uptime') && $loadavg = `/usr/bin/uptime` ) {
|
||||
} else if ( function_exists('is_executable') && is_executable('/usr/bin/uptime') && $loadavg = `/usr/bin/uptime` ) {
|
||||
if (preg_match('/load averages?: (\d+:\d+)/', $loadavg, $matches)) {
|
||||
$server_load = $matches[1];
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user