diff options
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php index 8a07dc113..7782eac40 100644 --- a/include/text.php +++ b/include/text.php @@ -37,7 +37,13 @@ function replace_macros($s, $r) { call_hooks('replace_macros', $arr); $t = App::template_engine(); - $output = $t->replace_macros($arr['template'], $arr['params']); + + try { + $output = $t->replace_macros($arr['template'], $arr['params']); + } catch (Exception $e) { + logger("Unable to render template: ",$e->getMessage()); + $output = "<h3>ERROR: there was an error creating the output.</h3>"; + } return $output; } @@ -2731,7 +2737,7 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag, $i $grp = group_byname($profile_uid,$name); if($grp) { - $g = q("select hash from groups where id = %d and visible = 1 limit 1", + $g = q("select hash from pgrp where id = %d and visible = 1 limit 1", intval($grp) ); if($g && $exclusive) { |