drush_cmi_tools
drush_cmi_tools copied to clipboard
Argument 2 passed to Drupal\config\StorageReplaceDataWrapper::replaceData() must be of the type array, boolean given,...
This was totally my fault, as I somehow generated an empty config file, but prompted me to include this to debug my issue. Thoughts on checking '$file_storage->read($name)' for 'false'?
foreach ($file_storage->listAll() as $name) {
$data = $file_storage->read($name);
if (is_bool($data)){
return drush_log(dt("Array expected, but a boolean was received in $name"), LogLevel::ERROR);
}
$source_storage->replaceData($name, $data);
}
Sure, PRs always welcome