소스 검색

Made exception information more useful on incorrect source files during migrations.

Frederic G. MARAND 7 년 전
부모
커밋
caea23ae1c
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/Plugin/migrate/source/ReinstallSourceBase.php

+ 3 - 2
src/Plugin/migrate/source/ReinstallSourceBase.php

@@ -168,8 +168,9 @@ class ReinstallSourceBase extends SourcePluginBase implements ContainerFactoryPl
     $bundle = $configuration['bundle'];
     $baseFilePath = "${type}/${bundle}.yml";
     $importPath = $configuration['importPath'] ?? NULL;
-    $filePath = realpath("$importPath/$baseFilePath");
-    if (!is_file($filePath) || !is_readable($filePath)) {
+    $filePath = "$importPath/$baseFilePath";
+    $realPath = realpath($filePath);
+    if (!is_file($realPath) || !is_readable($realPath)) {
       throw new MigrateException("${filePath} is not a readable file.");
     }