If no blocks have been exported and you try to import blocks, the following error occurs:
[error] TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in count() (line 348 of /var/www/html/web/modules/contrib/structure_sync/src/Controller/BlocksController.php) #0 /var/www/html/web/modules/contrib/structure_sync/src/Controller/BlocksController.php(348): count()
#1 /var/www/html/web/modules/contrib/structure_sync/src/Controller/BlocksController.php(159): Drupal\structure_sync\Controller\BlocksController::importBlocksSafe()
| Comment | File | Size | Author |
|---|
Issue fork structure_sync-3497649
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
Comment #2
duttonma commentedPatch attached to fix this issue
Comment #5
mparker17To make this easier to review, I've created a merge request.
A brief glance at the code in the merge request suggests that it has no tests. The Structure Sync maintainers prefer to accept merge requests that have passing automated tests. If you need help writing tests, please ask: I would be happy to help!