Check if given partial name is also file or only folder (#3190)
Fixes #2383. Credit to @vojtasvoboda, reviewed by @CptMeatball
This commit is contained in:
parent
dc16902fca
commit
04cb4ddd2c
|
|
@ -78,7 +78,8 @@ trait ViewMaker
|
|||
*/
|
||||
public function makePartial($partial, $params = [], $throwException = true)
|
||||
{
|
||||
if (!File::isPathSymbol($partial) && realpath($partial) === false) {
|
||||
$notRealPath = realpath($partial) === false || is_dir($partial) === true;
|
||||
if (!File::isPathSymbol($partial) && $notRealPath) {
|
||||
$folder = strpos($partial, '/') !== false ? dirname($partial) . '/' : '';
|
||||
$partial = $folder . '_' . strtolower(basename($partial)).'.htm';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue