Skip to content

Commit

Permalink
Merge pull request #894 from jeroenvermeulen/bugfix/messages_bug_pr825
Browse files Browse the repository at this point in the history
Pull request #825 broke the ESI messages. This commit fixes it.
  • Loading branch information
miguelbalparda committed Aug 27, 2015
2 parents 3f30eb9 + cb986e1 commit ad76b25
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/code/community/Nexcessnet/Turpentine/Block/Core/Messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,17 @@ protected function _toHtml() {
} else {
$this->_loadMessages();
$this->_loadSavedMessages();
$html = $this->_real_toHtml();
if ( count($this->getMessages()) ) {
$html = $this->_real_toHtml();
} else {
// Prevent returning an empty <ul></ul>
$html = '';
}
}
} else {
$html = $this->_real_toHtml();
}
$this->_directCall = false;
if (count($this->getMessages()) == 0) {
return '';
}
return $html;
}

Expand Down

0 comments on commit ad76b25

Please sign in to comment.