TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in C:\xampp\htdocs\xxxx\xxxx\web\core\lib\Drupal\Core\EventSubscriber\ConfigImportSubscriber.php on line 197

Created on 25 January 2023, over 2 years ago

Import the listed configuration changes? (yes/no) [yes]:
> yes

[warning] Undefined array key "gin" ConfigImportSubscriber.php:197
[warning] Attempt to read property "required_by" on null ConfigImportSubscriber.php:197
[error] TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in array_keys() (line 197 of C:\xampp\htdocs\MTN\xl_axiata\web\core\lib\Drupal\Core\EventSubscriber\ConfigImportSubscriber.php) #0 C:\xampp\htdocs\MTN\xl_axiata\web\core\lib\Drupal\Core\EventSubscriber\ConfigImportSubscriber.php(197): array_keys(NULL)
#1 C:\xampp\htdocs\MTN\xl_axiata\web\core\lib\Drupal\Core\EventSubscriber\ConfigImportSubscriber.php(76): Drupal\Core\EventSubscriber\ConfigImportSubscriber->validateThemes(Object(Drupal\Core\Config\ConfigImporter))
#2 [internal function]: Drupal\Core\EventSubscriber\ConfigImportSubscriber->onConfigImporterValidate(Object(Drupal\Core\Config\ConfigImporterEvent), 'config.importer...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#3 C:\xampp\htdocs\MTN\xl_axiata\web\core\lib\Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Drupal\Core\Config\ConfigImporterEvent), 'config.importer...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#4 C:\xampp\htdocs\MTN\xl_axiata\web\core\lib\Drupal\Core\Config\ConfigImporter.php(747): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Drupal\Core\Config\ConfigImporterEvent), 'config.importer...')
#5 C:\xampp\htdocs\MTN\xl_axiata\web\core\lib\Drupal\Core\Config\ConfigImporter.php(534): Drupal\Core\Config\ConfigImporter->validate()
#6 C:\xampp\htdocs\MTN\xl_axiata\vendor\drush\drush\src\Drupal\Commands\config\ConfigImportCommands.php(332): Drupal\Core\Config\ConfigImporter->initialize()
#7 C:\xampp\htdocs\MTN\xl_axiata\vendor\drush\drush\includes\drush.inc(206): Drush\Drupal\Commands\config\ConfigImportCommands->doImport(Object(Drupal\Core\Config\StorageComparer))
#8 C:\xampp\htdocs\MTN\xl_axiata\vendor\drush\drush\includes\drush.inc(197): drush_call_user_func_array(Array, Array)
#9 C:\xampp\htdocs\MTN\xl_axiata\vendor\drush\drush\src\Drupal\Commands\config\ConfigImportCommands.php(307): drush_op(Array, Object(Drupal\Core\Config\StorageComparer))
#10 [internal function]: Drush\Drupal\Commands\config\ConfigImportCommands->import(NULL, Array)
#11 C:\xampp\htdocs\MTN\xl_axiata\vendor\consolidation\annotated-command\src\CommandProcessor.php(257): call_user_func_array(Array, Array)
#12 C:\xampp\htdocs\MTN\xl_axiata\vendor\consolidation\annotated-command\src\CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#13 C:\xampp\htdocs\MTN\xl_axiata\vendor\consolidation\annotated-command\src\CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#14 C:\xampp\htdocs\MTN\xl_axiata\vendor\consolidation\annotated-command\src\AnnotatedCommand.php(350): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#15 C:\xampp\htdocs\MTN\xl_axiata\vendor\symfony\console\Command\Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 C:\xampp\htdocs\MTN\xl_axiata\vendor\symfony\console\Application.php(1027): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 C:\xampp\htdocs\MTN\xl_axiata\vendor\symfony\console\Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 C:\xampp\htdocs\MTN\xl_axiata\vendor\symfony\console\Application.php(149): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 C:\xampp\htdocs\MTN\xl_axiata\vendor\drush\drush\src\Runtime\Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 C:\xampp\htdocs\MTN\xl_axiata\vendor\drush\drush\src\Runtime\Runtime.php(48): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 C:\xampp\htdocs\MTN\xl_axiata\vendor\drush\drush\drush.php(72): Drush\Runtime\Runtime->run(Array)
#22 C:\xampp\htdocs\MTN\xl_axiata\vendor\drush\drush\drush(4): require('C:\\xampp\\htdocs...')
#23 {main}.
TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in C:\xampp\htdocs\MTN\xl_axiata\web\core\lib\Drupal\Core\EventSubscriber\ConfigImportSubscriber.php on line 197 #0 C:\xampp\htdocs\MTN\xl_axiata\web\core\lib\Drupal\Core\EventSubscriber\ConfigImportSubscriber.php(197): array_keys(NULL)
#1 C:\xampp\htdocs\MTN\xl_axiata\web\core\lib\Drupal\Core\EventSubscriber\ConfigImportSubscriber.php(76): Drupal\Core\EventSubscriber\ConfigImportSubscriber->validateThemes(Object(Drupal\Core\Config\ConfigImporter))
#2 [internal function]: Drupal\Core\EventSubscriber\ConfigImportSubscriber->onConfigImporterValidate(Object(Drupal\Core\Config\ConfigImporterEvent), 'config.importer...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#3 C:\xampp\htdocs\MTN\xl_axiata\web\core\lib\Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Drupal\Core\Config\ConfigImporterEvent), 'config.importer...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#4 C:\xampp\htdocs\MTN\xl_axiata\web\core\lib\Drupal\Core\Config\ConfigImporter.php(747): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Drupal\Core\Config\ConfigImporterEvent), 'config.importer...')
#5 C:\xampp\htdocs\MTN\xl_axiata\web\core\lib\Drupal\Core\Config\ConfigImporter.php(534): Drupal\Core\Config\ConfigImporter->validate()
#6 C:\xampp\htdocs\MTN\xl_axiata\vendor\drush\drush\src\Drupal\Commands\config\ConfigImportCommands.php(332): Drupal\Core\Config\ConfigImporter->initialize()
#7 C:\xampp\htdocs\MTN\xl_axiata\vendor\drush\drush\includes\drush.inc(206): Drush\Drupal\Commands\config\ConfigImportCommands->doImport(Object(Drupal\Core\Config\StorageComparer))
#8 C:\xampp\htdocs\MTN\xl_axiata\vendor\drush\drush\includes\drush.inc(197): drush_call_user_func_array(Array, Array)
#9 C:\xampp\htdocs\MTN\xl_axiata\vendor\drush\drush\src\Drupal\Commands\config\ConfigImportCommands.php(307): drush_op(Array, Object(Drupal\Core\Config\StorageComparer))
#10 [internal function]: Drush\Drupal\Commands\config\ConfigImportCommands->import(NULL, Array)
#11 C:\xampp\htdocs\MTN\xl_axiata\vendor\consolidation\annotated-command\src\CommandProcessor.php(257): call_user_func_array(Array, Array)
#12 C:\xampp\htdocs\MTN\xl_axiata\vendor\consolidation\annotated-command\src\CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#13 C:\xampp\htdocs\MTN\xl_axiata\vendor\consolidation\annotated-command\src\CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#14 C:\xampp\htdocs\MTN\xl_axiata\vendor\consolidation\annotated-command\src\AnnotatedCommand.php(350): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#15 C:\xampp\htdocs\MTN\xl_axiata\vendor\symfony\console\Command\Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 C:\xampp\htdocs\MTN\xl_axiata\vendor\symfony\console\Application.php(1027): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 C:\xampp\htdocs\MTN\xl_axiata\vendor\symfony\console\Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 C:\xampp\htdocs\MTN\xl_axiata\vendor\symfony\console\Application.php(149): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 C:\xampp\htdocs\MTN\xl_axiata\vendor\drush\drush\src\Runtime\Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 C:\xampp\htdocs\MTN\xl_axiata\vendor\drush\drush\src\Runtime\Runtime.php(48): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 C:\xampp\htdocs\MTN\xl_axiata\vendor\drush\drush\drush.php(72): Drush\Runtime\Runtime->run(Array)
#22 C:\xampp\htdocs\MTN\xl_axiata\vendor\drush\drush\drush(4): require('C:\\xampp\\htdocs...')
#23 {main}
TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in array_keys() (line 197 of C:\xampp\htdocs\MTN\xl_axiata\web\core\lib\Drupal\Core\EventSubscriber\ConfigImportSubscriber.php).
[warning] Drush command terminated abnormally.

🐛 Bug report
Status

Active

Version

9.3

Component
Configuration 

Last updated 11 days ago

Created by

🇮🇳India Sravani Ch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Sravani Ch
  • 🇮🇳India Sravani Ch

    line no 197 is

    foreach (array_keys($theme_data[$theme]->required_by) as $dependent_theme) {

  • Status changed to Postponed: needs info over 2 years ago
  • Let us know the precise steps to reproduce this.

    Drupal 9.3 is no longer being released so I am moving this to the bug fix branch.

  • Status changed to Closed: outdated over 1 year ago
  • 🇺🇸United States smustgrave

    Since there has not been a follow up in over a year going to close out for now. If still a valid bug please reopen updating issue summary with steps to reproduce please.

  • Status changed to Active about 1 year ago
  • 🇫🇷France fgm Paris, France

    Still present with Drupal core 10.2.6 and Drush 12.4.3.0, PHP 8.3.7.

    Downgrading to PHP 8.2.19, the issue goes away for me.

  • Status changed to Postponed: needs info about 1 year ago
  • This needs steps to reproduce.

  • 🇳🇿New Zealand quietone

    Drupal 10.2 only receives security maintenance now. Thus this issue needs to be reproducible on a Drupal 11.x or Drupal 10.3+. Without the steps to reproduce a proper fix can not be made.

    Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies.

  • Status changed to Closed: outdated 3 months ago
  • 🇺🇸United States smustgrave

    Since it's been almost another year without steps to reproduce going to close out. If it needs to be re-opened lets update the issue summary please.

    Thanks all

Production build 0.71.5 2024