projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cef5304
)
MDL-17492 Do not try to access the first key of an empty array in case of no tag...
author
mudrd8mz
<mudrd8mz>
Mon, 2 Mar 2009 21:51:25 +0000
(21:51 +0000)
committer
mudrd8mz
<mudrd8mz>
Mon, 2 Mar 2009 21:51:25 +0000
(21:51 +0000)
tag/locallib.php
patch
|
blob
|
history
diff --git
a/tag/locallib.php
b/tag/locallib.php
index 71597baad3c65b7fa5fd48083967c8243f554ce8..aaa0283ba99edf72db3c872c1b6c680c29e370ca 100644
(file)
--- a/
tag/locallib.php
+++ b/
tag/locallib.php
@@
-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();