"MDL-20819, sometimes, modules return non-array which can break stats processing, added more error checking"

This commit is contained in:
Dongsheng Cai
2009-12-04 03:04:37 +00:00
parent cee8f4b24a
commit 8aadf873b7
+4 -1
View File
@@ -1270,7 +1270,10 @@ function stats_get_action_names($str) {
require_once($file);
$function = $mod->name.'_get_'.$str.'_actions';
if (function_exists($function)) {
$actions = array_merge($actions,$function());
$mod_actions = $function();
if (is_array($mod_actions)) {
$actions = array_merge($actions, $mod_actions);
}
}
}