mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-17492 Do not try to access the first key of an empty array in case of no tag exists yet. Merged from 1.9 stable
This commit is contained in:
parent
cef5304562
commit
f6d7d5f584
@ -31,8 +31,10 @@ function tag_print_cloud($nr_of_tags=150, $return=false) {
|
||||
}
|
||||
|
||||
$tagkeys = array_keys($tagsincloud);
|
||||
$firsttagkey = $tagkeys[0];
|
||||
$maxcount = $tagsincloud[$firsttagkey]->count;
|
||||
if (!empty($tagkeys)) {
|
||||
$firsttagkey = $tagkeys[0];
|
||||
$maxcount = $tagsincloud[$firsttagkey]->count;
|
||||
}
|
||||
|
||||
$etags = array();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user