Skip to content

Commit fe08ce0

Browse files
committed
#16 - Fix formatters retrieval / improve direct string handling
1 parent 91a71ee commit fe08ce0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/TgUtils/Templating/Processor.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ protected function getVar($s) {
7070
$object = $parts[0];
7171
if (count($parts) > 1) return $this->getAttribute($object, $parts[1]);
7272
else {
73+
// Is there a string object?
74+
$object = $this->getObject($object);
75+
if (is_string($object)) return $object;
76+
77+
// Try a snippet
7378
$snippet = $this->getSnippet($object);
7479
if ($snippet != NULL) {
7580
if (is_string($snippet)) return $snippet;

0 commit comments

Comments
 (0)