Permalink
Browse files

"MDL-20819, sometimes, modules return non-array which can break stats…

… processing, added more error checking"
  • Loading branch information...
1 parent cee8f4b commit 8aadf873b71e42da8d2749338c572437f6d7bc37 @dcai dcai committed Dec 4, 2009
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/statslib.php
View
@@ -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);
+ }
}
}

0 comments on commit 8aadf87

Please sign in to comment.