Skip to content

Commit

Permalink
Perform the token check after transforming the template
Browse files Browse the repository at this point in the history
Fixes #54
  • Loading branch information
usox committed Aug 10, 2018
1 parent 0d4591f commit 092bb6e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Php/TalesInternal.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,11 @@ public static function php(string $src): string
throw new PhpNotAllowedException('The php modifier has been disabled, you must not use it.');
}

static::checkTokens($src);
$transformed = Transformer::transform($src, '$ctx->');

return Transformer::transform($src, '$ctx->');
static::checkTokens($transformed);

return $transformed;
}

/**
Expand Down

0 comments on commit 092bb6e

Please sign in to comment.