From 4745a69050a871d707055338c5a820ca083b2303 Mon Sep 17 00:00:00 2001 From: vyshane Date: Tue, 28 Feb 2006 04:33:39 +0000 Subject: [PATCH] Fixing Bug #4849 --- lib/moodlelib.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 4a4e346784a..86396229528 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -6810,12 +6810,13 @@ function get_performance_info() { if (function_exists('posix_times')) { $ptimes = posix_times(); - foreach ($ptimes as $key => $val) { - $info[$key] = $ptimes[$key] - $PERF->startposixtimes[$key]; + if (is_Array($ptimes)) { + foreach ($ptimes as $key => $val) { + $info[$key] = $ptimes[$key] - $PERF->startposixtimes[$key]; + } + $info['html'] .= "ticks: $info[ticks] user: $info[utime] sys: $info[stime] cuser: $info[cutime] csys: $info[cstime] "; + $info['txt'] .= "ticks: $info[ticks] user: $info[utime] sys: $info[stime] cuser: $info[cutime] csys: $info[cstime] "; } - $info['html'] .= "ticks: $info[ticks] user: $info[utime] sys: $info[stime] cuser: $info[cutime] csys: $info[cstime] "; - $info['txt'] .= "ticks: $info[ticks] user: $info[utime] sys: $info[stime] cuser: $info[cutime] csys: $info[cstime] "; - } // Grab the load average for the last minute