Skip to content

Commit 849b142

Browse files
committed
fix: file path in ViewException message is empty
1 parent 49520c7 commit 849b142

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

system/View/Parser.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,14 @@ public function render(string $view, array $options = null, bool $saveData = nul
117117

118118
if (! is_file($file))
119119
{
120-
$file = $this->loader->locateFile($view, 'Views');
121-
}
120+
$fileOrig = $file;
121+
$file = $this->loader->locateFile($view, 'Views');
122122

123-
// locateFile will return an empty string if the file cannot be found.
124-
if (empty($file))
125-
{
126-
throw ViewException::forInvalidFile($file);
123+
// locateFile will return an empty string if the file cannot be found.
124+
if (empty($file))
125+
{
126+
throw ViewException::forInvalidFile($fileOrig);
127+
}
127128
}
128129

129130
if (is_null($this->tempData))

0 commit comments

Comments
 (0)