Skip to content

Commit

Permalink
Merge pull request #66 from brunobraga/master
Browse files Browse the repository at this point in the history
Fixes #65 - i18n fails to replace empty variables in blocktrans
  • Loading branch information
speedmax committed Jun 26, 2013
2 parents 9a9ea97 + ce703b1 commit aa076f2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ext/i18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ function render($context, $stream) {
# Variable in output
foreach(array_keys($this->vars) as $var) {
$object = isset($cache[$var])? $cache[$var]: $context->resolve($var);
if (!is_null($object)) {
$output = str_replace("%({$var})", $object, $output);
}
$output = str_replace("%({$var})", $object, $output);
}
$context->pop();
$stream->write($output);
Expand Down

0 comments on commit aa076f2

Please sign in to comment.