mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
View Maker guessed paths can be null
This commit is contained in:
parent
e6440daf05
commit
a64422be20
@ -272,7 +272,7 @@ trait ViewMaker
|
||||
* @param string $suffix An extra path to attach to the end
|
||||
* @param bool $isPublic Returns public path instead of an absolute one
|
||||
*/
|
||||
public function guessViewPath(string $suffix = '', bool $isPublic = false): string
|
||||
public function guessViewPath(string $suffix = '', bool $isPublic = false): ?string
|
||||
{
|
||||
$class = get_called_class();
|
||||
return $this->guessViewPathFrom($class, $suffix, $isPublic);
|
||||
@ -284,7 +284,7 @@ trait ViewMaker
|
||||
* @param string $suffix An extra path to attach to the end
|
||||
* @param bool $isPublic Returns public path instead of an absolute one
|
||||
*/
|
||||
public function guessViewPathFrom(string $class, string $suffix = '', bool $isPublic = false): string
|
||||
public function guessViewPathFrom(string $class, string $suffix = '', bool $isPublic = false): ?string
|
||||
{
|
||||
$classFolder = strtolower(class_basename($class));
|
||||
$classFile = realpath(dirname(File::fromClass($class)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user