Skip to content

Commit

Permalink
Update/fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Reichel committed Jan 5, 2023
1 parent 9dd210d commit 5650cdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/code/core/Mage/Newsletter/Model/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function getType()
*/
public function isPreprocessed()
{
return $this->getTemplateTextPreprocessed() !== '';
return strlen($this->getTemplateTextPreprocessed()) > 0;
}

/**
Expand All @@ -181,7 +181,7 @@ public function getTemplateTextPreprocessed()
$this->setTemplateTextPreprocessed($this->getProcessedTemplate());
}

return $this->getData('template_text_preprocessed');
return (string) $this->getData('template_text_preprocessed');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function setValidationFilter($websiteId, $customerGroupId, $couponCode =
$select = $this->getSelect();

$connection = $this->getConnection();
if ($couponCode !== '') {
if (is_string($couponCode) && strlen($couponCode)) {
$select->joinLeft(
['rule_coupons' => $this->getTable('salesrule/coupon')],
$connection->quoteInto(
Expand Down

0 comments on commit 5650cdd

Please sign in to comment.