Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument 2 passed to Drupal\config\StorageReplaceDataWrapper::replaceData() must be of the type array, boolean given,... #12

Open
nstriedinger opened this issue Feb 20, 2017 · 1 comment

Comments

@nstriedinger
Copy link

nstriedinger commented Feb 20, 2017

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);
  }
@larowlan
Copy link
Member

Sure, PRs always welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants