1
0
Fork 0

Fix code to work with old php, fixes #4779 #4780

pull/4784/head
Jordi Boggiano 2016-01-16 17:59:35 +00:00
parent 974fb4ac66
commit b839c7ef1c
1 changed files with 2 additions and 1 deletions

View File

@ -105,9 +105,10 @@ class RepositoryManager
$class = $this->repositoryClasses[$type]; $class = $this->repositoryClasses[$type];
$reflMethod = new \ReflectionMethod($class, '__construct'); $reflMethod = new \ReflectionMethod($class, '__construct');
$params = $reflMethod->getParameters(); $params = $reflMethod->getParameters();
if (isset($params[4]) && $params[4]->getType()->__toString() === 'Composer\Util\RemoteFilesystem') { if (isset($params[4]) && $params[4]->getClass() && $params[4]->getClass()->getName() === 'Composer\Util\RemoteFilesystem') {
return new $class($config, $this->io, $this->config, $this->eventDispatcher, $this->rfs); return new $class($config, $this->io, $this->config, $this->eventDispatcher, $this->rfs);
} }