Upgrade to 3.7.1

This commit is contained in:
Bastian Allgeier
2022-07-12 13:33:21 +02:00
parent 7931eb5e47
commit 1ad1eaf387
377 changed files with 63981 additions and 63824 deletions

View File

@@ -16,36 +16,36 @@ use Throwable;
*/
class Tpl
{
/**
* Renders the template
*
* @param string|null $file
* @param array $data
* @return string
* @throws Throwable
*/
public static function load(?string $file = null, array $data = []): string
{
if ($file === null || is_file($file) === false) {
return '';
}
/**
* Renders the template
*
* @param string|null $file
* @param array $data
* @return string
* @throws Throwable
*/
public static function load(?string $file = null, array $data = []): string
{
if ($file === null || is_file($file) === false) {
return '';
}
ob_start();
ob_start();
$exception = null;
try {
F::load($file, null, $data);
} catch (Throwable $e) {
$exception = $e;
}
$exception = null;
try {
F::load($file, null, $data);
} catch (Throwable $e) {
$exception = $e;
}
$content = ob_get_contents();
ob_end_clean();
$content = ob_get_contents();
ob_end_clean();
if ($exception === null) {
return $content;
}
if ($exception === null) {
return $content;
}
throw $exception;
}
throw $exception;
}
}