Skip to content

Commit

Permalink
Updated calls to strlen(), ref #2586 (#2898)
Browse files Browse the repository at this point in the history
* Updated calls to strlen(), ref #2586

* Update/fix
  • Loading branch information
sv3n committed Jan 8, 2023
1 parent 85aa619 commit d676a47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/code/core/Mage/Newsletter/Model/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 (strlen($couponCode)) {
if (is_string($couponCode) && strlen($couponCode)) {
$select->joinLeft(
['rule_coupons' => $this->getTable('salesrule/coupon')],
$connection->quoteInto(
Expand Down

0 comments on commit d676a47

Please sign in to comment.