Skip to content

Commit

Permalink
Do not check for is file in template handling
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzap committed Jul 13, 2016
1 parent c2a8f39 commit 96022c9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Cortex/Router/ResultHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,14 @@ private function setTemplate($template)
$template = is_file($template) ? $template : locate_template([$template], false);
$template or $template = null;
}

// Allow template to be a file path or `false`, which will actually disable template
if (! is_file($template) && $template !== false) {

if (is_null($template)) {
return;
}

// If template is `false`, we return `true` on `"{$type}_template"`
// to speed up `template-loader.php`
$template_setter = $template
$template_setter = $template !== false
? function () use ($template) {
return $template;
}
Expand Down

0 comments on commit 96022c9

Please sign in to comment.