- // Do the replacement
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'template='.$GLOBALS['current_template']);
- $replacer = '{DQUOTE} . doTemplate' . $data['callback'] . "('" . $GLOBALS['current_template'] . "', true";
-
- // Is 'value' set?
- if (!empty($data['value'])) {
- // Then include it as well
- $replacer .= ", '" . $data['value'] . "'";
+ // Init replacer
+ $replacer = '<!-- ['.__FUNCTION__.':'.__LINE__.'] Call-back function doTemplate' . $data['callback'] . ' does not exist. //-->';
+
+ // Is the function there?
+ if (function_exists($data['callback'])) {
+ // Do the replacement
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'template='.$GLOBALS['current_template']);
+ $replacer = '{DQUOTE} . doTemplate' . $data['callback'] . "('" . $GLOBALS['current_template'] . "', true";
+
+ // Is 'value' set?
+ if (!empty($data['value'])) {
+ // Then include it as well
+ $replacer .= ", '" . $data['value'] . "'";
+ } // END - if
+
+ // Replacer is ready
+ $replacer .= ') . {DQUOTE}';