diff --git a/src/Codeception/Module/DrupalUser.php b/src/Codeception/Module/DrupalUser.php index 4dd9d39..9aac7c4 100644 --- a/src/Codeception/Module/DrupalUser.php +++ b/src/Codeception/Module/DrupalUser.php @@ -200,7 +200,7 @@ private function deleteUsersContent($uid) { continue; } try { - /** @var EntityStorageInterface $storage */ + /** @var EntityStorageInterface $storage */ $storage = \Drupal::entityTypeManager()->getStorage($cleanup_entity); } catch (\Exception $e) { @@ -209,7 +209,7 @@ private function deleteUsersContent($uid) { } try { $bundles = \Drupal::service('entity_type.bundle.info')->getBundleInfo($cleanup_entity); - foreach ($bundles as $bundle) { + foreach ($bundles as $bundle => $bundle_data) { $all_bundle_fields = \Drupal::service('entity_field.manager')->getFieldDefinitions($cleanup_entity, $bundle); if (isset($all_bundle_fields['uid'])) { $entities = $storage->loadByProperties(['uid' => $uid]);