Problem/Motivation

updateStatusOverride function, located in config_split/src/Form/ConfigImportFormTrait.php has some logic issue.

It is being called only once from the launchImport function

Below are the code:

        if (!$override !== NULL) {
          $batch_builder->addOperation([$this, 'updateStatusOverride'], [$this->getSplit()->getName(), $override]);
        }

This code will go the updateStatusOverride callback only in case of $override === NULL.

But the callback itself expects a string. Having NULL as a parameter leads to an error.

So basically, I think this is just a small mistyping issue, and instead of
if (!$override !== NULL) {

should be

if ($override !== NULL) {

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

driverok created an issue. See original summary.

driverok’s picture

Status: Active » Needs review

To reproduce the issue just try importing split configuration via UI

joachim’s picture

Title: Logic issue with updateStatusOverride callback » Logic issue with ConfigSplitImportForm::updateStatusOverride() -- Argument #2 ($status) must be of type string, null given
Status: Needs review » Reviewed & tested by the community

Making the title clearer.

Confirming this fixes the error for me.

bircher’s picture

Assigned: driverok » bircher