We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfbfbcc commit 485f410Copy full SHA for 485f410
controllers/Controller.php
@@ -134,16 +134,15 @@ protected function assign($name, $value)
134
*/
135
protected function displayView($viewFilename)
136
{
137
- chdir('views');
138
-
139
if (! file_exists($viewFilename)) {
140
throw new RuntimeException("Filename does not exist: $viewFilename");
141
}
+
142
// Extract view variables into current scope
143
extract($this->viewVariables);
144
145
// Display the view
146
- require $viewFilename;
+ require realpath(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . $viewFilename);
147
148
149
/**
0 commit comments