Skip to content

Parameter must be an array or an object that implements Countable #80

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

Merged
merged 1 commit into from
Jun 6, 2018

Conversation

pingers
Copy link
Contributor

@pingers pingers commented Jun 5, 2018

I received the following error when the scaffold was trying to download "initial" files during composer install, but they already exist and there are no curl requests to make.

Script DrupalComposer\DrupalScaffold\Plugin::scaffold handling the drupal-scaffold event terminated with an exception
[ErrorException]                                                            
  count(): Parameter must be an array or an object that implements Countable

This solves the problem by avoiding "curling" when there's nothing to curl.
The actual error is because curl never gets set up correctly and then when it gets to the do while in fetchWithPrestissimo(), $multi->remain() returns NULL (because it was never initialised).

@emerham
Copy link

emerham commented Jun 6, 2018

I also get this same error when running composer update, applying this fix does allow for update to finish cleanly

@webflo webflo merged commit 2d6b255 into drupal-composer:master Jun 6, 2018
@webflo
Copy link
Member

webflo commented Jun 6, 2018

Released as 2.5.1

Thanks for your help!

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

Successfully merging this pull request may close these issues.

3 participants