- Issue created by @developer-rocha
- Merge request !4Fix null entity error in BlockUsageReportController → (Open) created by developer-rocha
When deleting a block, the following error occurs:
TypeError: Drupal\Core\Entity\EntityListBuilder::getOperations(): Argument #1 ($entity) must be of type Drupal\Core\Entity\EntityInterface, null given, called in /var/www/html/web/modules/contrib/block_usage_report/src/Controller/BlockUsageReportController.php on line 344 in Drupal\Core\Entity\EntityListBuilder->getOperations() (line 123 of core/lib/Drupal/Core/Entity/EntityListBuilder.php).
The error happens when attempting to delete a block.
It seems that the method getOperations receives a null value instead of an EntityInterface.
Drupal core: 10.3.5
PHP: 8.2.15
Active
1.0
Code