Browse Source

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

Frederic G. MARAND 7 years ago
parent
commit
caea23ae1c
1 changed files with 3 additions and 2 deletions
  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.");
     }