Skip to content

Commit

Permalink
Merge pull request #22 from igorhrcek/issue-4.2
Browse files Browse the repository at this point in the history
Fix rules without template vars
  • Loading branch information
igorhrcek authored Mar 20, 2022
2 parents 991f423 + 9bd5536 commit 69df9a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/RuleContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ public function __construct(array $content, array $templateVars ) {
* @return bool
*/
public function getContent() : array {

if ( empty( $this->templateVars ) ) {
return $this->content;
}

$result = '';
$templateContent = implode( PHP_EOL, $this->content );

Expand Down

0 comments on commit 69df9a3

Please sign in to comment.