Skip to content

Commit

Permalink
Fix local cid resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroTroller committed May 24, 2016
1 parent 961b849 commit 5867769
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Knp/UniMail/Cid/Resolver/LocalFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ public function __construct($directory)
public function createFromString($string)
{
$string = str_replace('/', DIRECTORY_SEPARATOR, $string);
$string = sprintf('%s%s%s', $this->directory, DIRECTORY_SEPARATOR, $string);

if (false === file_exists($string)) {
return;
}

return Swift_EmbeddedFile::fromPath(sprintf('%s%s%s', $this->directory, DIRECTORY_SEPARATOR, $string));
return Swift_EmbeddedFile::fromPath($string);
}
}

0 comments on commit 5867769

Please sign in to comment.