Skip to content

Fix error in DbaConfigGenerator::generateConfigEntity()

Aman Naudiyal requested to merge issue/dbanonymizer-3443140:1.0.x into 1.0.x

Overview

There was an error reported. Steps to reproduce:

  1. Go to module config generation page (/admin/dbanonymizer-config-generator)
  2. Expected result: the page is opened with generated config on it.
  3. Actual result: it throws an error:
TypeError: Drupal\dbacg\Generator\DbaConfigGenerator::table(): Argument #1 ($table) must be of type string, null given, called in /modules/contrib/dbanonymizer/src/Generator/DbaConfigGenerator.php on line 235 in Drupal\dbacg\Generator\DbaConfigGenerator->table() (line 498 of modules\contrib\dbanonymizer\src\Generator\DbaConfigGenerator.php).

Now it's fixed.

Technical details

Looks like some entity doesn't provide any db table. As it does not make sense to generate config without a table we modify the DbaConfigGenerator::generateConfigEntity() to quit in such cases.

Edited by Ivan Klochko

Merge request reports

Loading