Skip to content

Commit

Permalink
check if template directory exists before adding it to template
Browse files Browse the repository at this point in the history
  • Loading branch information
meritel committed Oct 18, 2016
1 parent 8bb0b2e commit 528f306
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Skeleton/Core/Web/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ public function __construct() {
$this->template = new \Skeleton\Template\Template();
$application = \Skeleton\Core\Application::Get();

$this->template->add_template_directory($application->template_path, $application->name);
if (file_exists($application->template_path)) {
$this->template->add_template_directory($application->template_path, $application->name);
}
$packages = \Skeleton\Core\Package::get_all();
foreach ($packages as $package) {
if (file_exists($package->template_path)) {
Expand Down

0 comments on commit 528f306

Please sign in to comment.