- Mostly bugfixes made while working on ParcInfo
This commit is contained in:
1 parent
67040db155
commit
45c8173029
4 files changed
+28
-8
No files matched your search
@@ -43,8 +43,13 @@ class FileFetcher
|
||||
foreach($this->folderList as $folder) {
|
||||
foreach($this->supportedExtensionList as $extension) {
|
||||
$file = $folder['path'] . DIRECTORY_SEPARATOR . "$fileName.$extension";
|
||||
$file = str_replace([ '\\', '/' ], DIRECTORY_SEPARATOR, $file);
|
||||
|
||||
if ( file_exists($file) ) {
|
||||
if ( is_dir($file) ) {
|
||||
throw new \RuntimeException("Given view file `$fileName` is a folder, you must provide a valid filename.");
|
||||
}
|
||||
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
@@ -53,8 +58,13 @@ class FileFetcher
|
||||
# Fallback on full-path
|
||||
foreach($this->folderList as $folder) {
|
||||
$file = $folder['path'] . DIRECTORY_SEPARATOR . $fileName;
|
||||
$file = str_replace([ '\\', '/' ], DIRECTORY_SEPARATOR, $file);
|
||||
|
||||
if ( file_exists($file) ) {
|
||||
if ( is_dir($file) ) {
|
||||
throw new \RuntimeException("Given view file `$fileName` is a folder, you must provide a valid filename.");
|
||||
}
|
||||
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user