Skip to content
Snippets Groups Projects
Commit b072871d authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2081127 by mrsinguyen: Remove Unused local variables from...

Issue #2081127 by mrsinguyen: Remove Unused local variables from /core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Vocabulary.php.
parent 227f21b3
No related branches found
No related tags found
Loading
......@@ -112,10 +112,10 @@ public function postSave(EntityStorageControllerInterface $storage_controller, $
// Reflect machine name changes in the definitions of existing 'taxonomy'
// fields.
$fields = field_read_fields();
foreach ($fields as $field_name => $field) {
foreach ($fields as $field) {
$update_field = FALSE;
if ($field['type'] == 'taxonomy_term_reference') {
foreach ($field['settings']['allowed_values'] as $key => &$value) {
foreach ($field['settings']['allowed_values'] as &$value) {
if ($value['vocabulary'] == $this->getOriginalID()) {
$value['vocabulary'] = $this->id();
$update_field = TRUE;
......@@ -155,7 +155,7 @@ public static function postDelete(EntityStorageControllerInterface $storage_cont
// Load all Taxonomy module fields and delete those which use only this
// vocabulary.
$taxonomy_fields = field_read_fields(array('module' => 'taxonomy'));
foreach ($taxonomy_fields as $field_name => $taxonomy_field) {
foreach ($taxonomy_fields as $taxonomy_field) {
$modified_field = FALSE;
// Term reference fields may reference terms from more than one
// vocabulary.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment