mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 05:25:08 +02:00
"MDL-20819, sometimes, modules return non-array which can break stats processing, added more error checking, merged from 1.9"
This commit is contained in:
parent
e34a6ea36b
commit
553baa8f76
@ -1287,7 +1287,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user