Error: Cannot use string offset as an array in MailSystemModules.php on line 36

Created on 22 July 2024, 5 months ago
Updated 25 August 2024, 4 months ago

Problem/Motivation

During migration I am seeing this as other people are reporting on the original migration issue 📌 Migration from D7 to D9 Fixed

[warning] Undefined array key 1 MailSystemModules.php:28
[warning] String offset cast occurred MailSystemModules.php:36
Error: Cannot use string offset as an array in /var/www/html/public/modules/contrib/mailsystem/src/Plugin/migrate/process/MailSystemModules.php on line 36 #0 /var/www/html/public/core/modules/migrate/src/MigrateExecutable.php(453): Drupal\mailsystem\Plugin\migrate\process\MailSystemModules->transform(Array, Object(Drupal\migrate_tools\MigrateExecutable), Object(Drupal\migrate\Row), 'modules')
#1 /var/www/html/public/core/modules/migrate/src/MigrateExecutable.php(221): Drupal\migrate\MigrateExecutable->processPipeline(Object(Drupal\migrate\Row), 'modules', Array, Array)
#2 /var/www/html/vendor/drush/drush/includes/drush.inc(62): Drupal\migrate\MigrateExecutable->import()
#3 /var/www/html/vendor/drush/drush/includes/drush.inc(53): drush_call_user_func_array(Array, Array)
#4 /var/www/html/public/modules/contrib/migrate_tools/src/Drush/Commands/MigrateToolsCommands.php(1072): drush_op(Array)
#5 /var/www/html/public/modules/contrib/migrate_tools/src/Drush/Commands/MigrateToolsCommands.php(483): Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands->executeMigration(Object(Drupal\migrate\Plugin\Migration), 'mycs_mail_syste...', Array)
#6 [internal function]: Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands->import('mycs_mail_syste...', Array)
#7 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
#8 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#9 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#10 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(387): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#11 /var/www/html/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/html/vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/html/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run(Array)
#18 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
#19 /var/www/html/vendor/bin/drush(119): include('/var/www/html/v...')
#20 {main}
Error: Cannot use string offset as an array in Drupal\mailsystem\Plugin\migrate\process\MailSystemModules->transform() (line 36 of /var/www/html/public/modules/contrib/mailsystem/src/Plugin/migrate/process/MailSystemModules.php).
[warning] Drush command terminated abnormally.

Steps to reproduce

drush mim mail_system_settings

Proposed resolution

TBD

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

🇨🇦Canada joelpittet Vancouver

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024