Added check for missing template file

pull/11/head
Mike Cao 14 years ago
parent e1cf8a1f99
commit eeb32df46e

@ -77,7 +77,13 @@ class View {
extract($this->data);
include $this->path.'/'.$this->template;
$file = $this->path.'/'.$this->template;
if (!file_exists($file)) {
throw new Exception("Template file not found: $file.");
}
include $file;
}
/**

Loading…
Cancel
Save