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

direct-install - notice of array to string conversion #1405

Closed
ghost opened this issue Apr 5, 2017 · 4 comments
Closed

direct-install - notice of array to string conversion #1405

ghost opened this issue Apr 5, 2017 · 4 comments
Assignees

Comments

@ghost
Copy link

ghost commented Apr 5, 2017

Using bin/gpm direct-install
when the dependencies in a blueprint contain a github repository
(as in the first example shown in learn.getgrav.org )
I get a notice of array to string conversion to the line 158 of file DirectInstallCommand.php

I tried on the develop branch

@flaviocopes flaviocopes added the bug label Apr 6, 2017
@flaviocopes flaviocopes self-assigned this Apr 6, 2017
@rhukster
Copy link
Member

rhukster commented Apr 10, 2017

Did you try to install a skeleton???

@ghost
Copy link
Author

ghost commented Apr 10, 2017

I tried to install a plugin, exactly my snappygrav.
This is the blueprints that concerns him.

Locally I solved by replacing these lines (in DirectInstallCommand.php)

if (is_array($dependency) && isset($dependency['name'])) {
   $depencencies[] = $dependency['name'];
} else {
   $depencencies[] = $dependency;
 }

with these lines

if (is_array($dependency)){
   if( isset($dependency['name'])) {
      $depencencies[] = $dependency['name'];
   }
   if( isset($dependency['github'])) {
      $depencencies[] = $dependency['github'];
   }
} else {
   $depencencies[] = $dependency;
}

@flaviocopes
Copy link
Contributor

Thanks for reporting!

@ghost
Copy link
Author

ghost commented Apr 11, 2017

Thanks to you

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

No branches or pull requests

2 participants