deal gracefully with non-existent files
This commit is contained in:
parent
b4a95460e6
commit
c94c500cdc
@ -18,6 +18,8 @@ function replace_macros($s,$r) {
|
|||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
if($a->get_template_engine() === 'smarty3') {
|
if($a->get_template_engine() === 'smarty3') {
|
||||||
|
$output = '';
|
||||||
|
if(gettype($s) !== 'NULL') {
|
||||||
$template = '';
|
$template = '';
|
||||||
if(gettype($s) === 'string') {
|
if(gettype($s) === 'string') {
|
||||||
$template = $s;
|
$template = $s;
|
||||||
@ -31,6 +33,7 @@ function replace_macros($s,$r) {
|
|||||||
}
|
}
|
||||||
$output = $s->parsed($template);
|
$output = $s->parsed($template);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
$r = $t->replace($s,$r);
|
$r = $t->replace($s,$r);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user