Skip to content

Commit

Permalink
Merge pull request #2 from SoulCover/master
Browse files Browse the repository at this point in the history
[BUGFIX] Check for empty values
  • Loading branch information
monofone committed Feb 15, 2016
2 parents 7b84a93 + af69c3c commit c40c459
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public function getValue() {
*/
public function evaluate() {
$text = $this->getValue();
if (empty($text)) {
return $text;
}
if (!is_string($text)) {
throw new Exception(sprintf('Only strings can be processed by this TypoScript object, given: "%s".', gettype($text)), 1409659552);
}
Expand Down Expand Up @@ -93,4 +96,4 @@ public function convertMailLink($matches) {
$replacedHrefContent = $this->mailToHrefConverter->convert($email);
return $matches[1] . htmlspecialchars($replacedHrefContent);
}
}
}

0 comments on commit c40c459

Please sign in to comment.