diff --git a/sites/all/modules/features/features/features.module b/sites/all/modules/features/features/features.module index 5b60129..177fd2f 100644 --- a/sites/all/modules/features/features/features.module +++ b/sites/all/modules/features/features/features.module @@ -978,7 +978,7 @@ function _user_features_change_term_permission(&$perm, $type = 'vid') { // id. if (strpos($perm, 'edit terms in ') !== FALSE || strpos($perm, 'delete terms in ') !== FALSE) { preg_match("/(?<=\040)([^\s]+?)$/", trim($perm), $voc_id); - $vid = $voc_id[0]; + $vid = $voc_id[0]; if (is_numeric($vid) && $type == 'vid') { if (function_exists('taxonomy_vocabulary_load')) { $voc = taxonomy_vocabulary_load($vid); @@ -986,8 +986,9 @@ function _user_features_change_term_permission(&$perm, $type = 'vid') { } } elseif ($type == 'machine_name') { - $voc = taxonomy_vocabulary_machine_name_load($vid); - $perm = str_replace($vid, $voc->vid, $perm); + if ($voc = taxonomy_vocabulary_machine_name_load($vid)) { + $perm = str_replace($vid, $voc->vid, $perm); + } } } }