Skip to content

Commit 7f6d9c0

Browse files
committed
Passing empty string for is_file() when param null #4032
1 parent a37a945 commit 7f6d9c0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Toolkit/Tpl.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ class Tpl
1919
/**
2020
* Renders the template
2121
*
22-
* @param string $file
22+
* @param string|null $file
2323
* @param array $data
2424
* @return string
25+
* @throws Throwable
2526
*/
26-
public static function load(string $file = null, array $data = []): string
27+
public static function load(?string $file = null, array $data = []): string
2728
{
28-
if (is_file($file) === false) {
29+
if ($file === null || is_file($file) === false) {
2930
return '';
3031
}
3132

0 commit comments

Comments
 (0)