소스 검색

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

Jordi Boggiano 9 년 전
부모
커밋
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);
         }