Skip to content

Commit

Permalink
Surround the check value by slashes to ensure the position is the fol…
Browse files Browse the repository at this point in the history
…der and not any other string part - checking the full filepath
  • Loading branch information
natanfelles committed Dec 1, 2018
1 parent 64cfc1a commit 90cab15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/Autoloader/FileLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function locateFile(string $file, string $folder = null, string $ext = 'p
// IF we have a folder name, then the calling function
// expects this file to be within that folder, like 'Views',
// or 'libraries'.
if (! empty($folder) && strpos($filename, $folder . '/') !== 0)
if (! empty($folder) && strpos($path . $filename, '/' . $folder . '/') === false)
{
$filename = $folder . '/' . $filename;
}
Expand Down

0 comments on commit 90cab15

Please sign in to comment.