get('page'); if (is_null($value) || trim($value) === '') { $error = "Skipping because content filepath is empty for {$page}."; } elseif (!is_file($value)) { $error = "Skipping because content file is missing for {$page}."; } else { $contents = file_get_contents($value); if ($contents !== FALSE) { return $contents; } $error = "Skipping because content file is unreadable for {$page}."; } if ($error) { Drush::output()->writeln($error); throw new MigrateSkipRowException($error); } return ''; } }