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

main
Jordi Boggiano 9 years ago
parent 974fb4ac66
commit b839c7ef1c

@ -105,9 +105,10 @@ class RepositoryManager
$class = $this->repositoryClasses[$type];
$reflMethod = new \ReflectionMethod($class, '__construct');
$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);
}

Loading…
Cancel
Save