From 554031dc70bda40349330bd134a03d8042737845 Mon Sep 17 00:00:00 2001 From: fabien Date: Thu, 22 Oct 2009 00:44:44 +0000 Subject: [PATCH] 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 --- lib/Twig/Loader/Filesystem.php | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) 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); } } -- 1.7.2.5