From: fabien Date: Thu, 22 Oct 2009 00:44:44 +0000 (+0000) Subject: added an exception of a template path does not exist X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=554031dc70bda40349330bd134a03d8042737845;p=konrad%2Ftwig.git added an exception of a template path does not exist git-svn-id: http://svn.twig-project.org/trunk@85 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- diff --git a/lib/Twig/Loader/Filesystem.php b/lib/Twig/Loader/Filesystem.php index 8ec795b..fdd1ad8 100644 --- a/lib/Twig/Loader/Filesystem.php +++ b/lib/Twig/Loader/Filesystem.php @@ -61,6 +61,11 @@ class Twig_Loader_Filesystem extends Twig_Loader $this->paths = array(); foreach ($paths as $path) { + if (!is_dir($path)) + { + throw new InvalidArgumentException(sprintf('The "%s" directory does not exist.', $path)); + } + $this->paths[] = realpath($path); } }