Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

… processing, added more error checking"
  • Loading branch information...
commit 8aadf873b71e42da8d2749338c572437f6d7bc37 1 parent cee8f4b
@dcai dcai authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/statslib.php
View
5 lib/statslib.php
@@ -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);
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.