MDL-19823 Fixed un-handled case of emty array in foreach loop

This commit is contained in:
nicolasconnault 2009-09-11 06:59:30 +00:00
parent 0fd3556d26
commit 0f097239c4

View File

@ -92,6 +92,10 @@ function tag_set($record_type, $record_id, $tags) {
}
}
if (empty($tags)) {
return true;
}
foreach($tags as $ordering => $tag) {
$tag = trim($tag);
if (!$tag) {