Problem/Motivation

showConfig can result in a TypeError if there are no sensitive config items:

TypeError: ArrayObject::__construct(): Argument #1 ($array) must be of type array, null given in /var/www/html/vendor/consolidation/output-formatters/src/StructuredData/AbstractListData.php on line 15 #0 /var/www/html/vendor/consolidation/output-formatters/src/StructuredData/AbstractListData.php(15): ArrayObject->__construct()
#1 /var/www/html/vendor/consolidation/output-formatters/src/StructuredData/AbstractStructuredList.php(23): Consolidation\OutputFormatters\StructuredData\AbstractListData->__construct()
#2 /var/www/html/docroot/modules/contrib/credential_mask/src/Commands/CredentialMaskCommands.php(148): Consolidation\OutputFormatters\StructuredData\AbstractStructuredList->__construct()
#3 [internal function]: Drupal\credential_mask\Commands\CredentialMaskCommands->showConfig()
#4 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array()
#5 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback()
#6 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter()
#7 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(387): Consolidation\AnnotatedCommand\CommandProcessor->process()
#8 /var/www/html/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute()
#9 /var/www/html/vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run()
#10 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#11 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#12 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run()
#13 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()
#14 /var/www/html/vendor/drush/drush/drush.php(140): Drush\Runtime\Runtime->run()
#15 /var/www/html/vendor/bin/drush.php(119): include('...')
#16 {main}

Steps to reproduce

1. enable the module
2. drush credential_mask:show-configuration

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

malcomio created an issue. See original summary.

malcomio’s picture

Status: Active » Needs review

  • malcomio committed 702bcc38 on 1.0.x
    [#3551181] feat: TypeError if config list is empty
    
malcomio’s picture

Status: Needs review » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.