Skip to content

Commit 485f410

Browse files
committed
Bug fix - blank login screen
1 parent bfbfbcc commit 485f410

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

controllers/Controller.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,15 @@ protected function assign($name, $value)
134134
*/
135135
protected function displayView($viewFilename)
136136
{
137-
chdir('views');
138-
139137
if (! file_exists($viewFilename)) {
140138
throw new RuntimeException("Filename does not exist: $viewFilename");
141139
}
140+
142141
// Extract view variables into current scope
143142
extract($this->viewVariables);
144143

145144
// Display the view
146-
require $viewFilename;
145+
require realpath(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . $viewFilename);
147146
}
148147

149148
/**

0 commit comments

Comments
 (0)