foreach ($variableMatches[3] as $key=>$var) {
// Try to assign it, empty strings are being ignored
$this->assignTemplateVariable($variableMatches[1][$key], $var);
- }
- }
+ } // END - foreach
+ } // END - if
}
/**
// Remember this template for recursion detection
// RECURSIVE PROTECTION!
$this->loadedTemplates[] = $template;
+ } catch (FileIsMissingException $e) {
+ // Even this is not done... :/
+ $this->rawTemplates[] = $template;
} catch (FilePointerNotOpenedException $e) {
// Even this is not done... :/
$this->rawTemplates[] = $template;
// Remember this template for recursion detection
// RECURSIVE PROTECTION!
$this->loadedTemplates[] = $template;
+ } catch (FileIsMissingException $e) {
+ // This template was never found. We silently ignore it
+ unset($this->rawTemplates[$key]);
} catch (FilePointerNotOpenedException $e) {
// This template was never found. We silently ignore it
unset($this->rawTemplates[$key]);
} // END - while
// Prepare PHP code for eval() command
+ $evalLength = strlen($eval);
$eval = str_replace(
"<%php", "\";",
str_replace(
)
);
- // Debug message
- if ((defined('DEBUG_EVAL')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Constructed PHP command: <pre><em>%s</em></pre><br />\n",
- $this->__toString(),
- htmlentities($eval)
- ));
-
- // Run the constructed command. This will "compile" all variables in
- eval($eval);
+ // Did something change?
+ if (strlen($eval) != $eval) {
+ // Run the constructed command. This will "compile" all variables in
+ eval($eval);
+ } // END - if
// Set raw template data
$this->setRawTemplateData($result);