Skip to content

Commit

Permalink
Make checks for requested directory
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Aug 7, 2014
1 parent 25f638b commit fdcf8ff
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Dispatcher/PageDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ class PageDispatcher extends Dispatcher {
public function getPath($uri) {
$pageViewDir = Path::fixCase(Path::get(Path::PAGEVIEW) . $uri);
if(!is_dir($pageViewDir)) {
$pageViewDir = dirname($pageViewDir);
$pageViewDir_container = dirname($pageViewDir);

if(!is_dir($pageViewDir_container)) {
throw new \Gt\Core\Exception\RequiredAppResourceNotFoundException(
$pageViewDir
);
}

$pageViewDir = $pageViewDir_container;
}

return $pageViewDir;
Expand Down

0 comments on commit fdcf8ff

Please sign in to comment.