Просмотр исходного кода

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

Jordi Boggiano 9 лет назад
Родитель
Сommit
b839c7ef1c
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      src/Composer/Repository/RepositoryManager.php

+ 2 - 1
src/Composer/Repository/RepositoryManager.php

@@ -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);
         }