Skip to content
Snippets Groups Projects
Commit bdd3a573 authored by Stew West's avatar Stew West
Browse files

Issue #3414874: Sector Notices

parent 2a6803cc
No related branches found
No related tags found
1 merge request!110Issue #3414874 by stewest: Sector Notices
......@@ -32,7 +32,10 @@ function sector_notice_uninstall() {
];
foreach($blocks_to_remove as $uuid) {
$block_content = \Drupal::service('entity.repository')->loadEntityByUuid('block_content', $uuid);
$block_content->delete();
if ($block_content) {
$block_content->delete();
}
}
$blockTypeMachineName = 'sector_notice';
......@@ -48,4 +51,4 @@ function sector_notice_uninstall() {
\Drupal::logger('sector_notice')->error(t('The block type %type could not be found.', array('%type' => $blockTypeMachineName)));
}
}
\ No newline at end of file
}
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