Skip to content

Commit b358a52

Browse files
authored
Merge branch 'main' into import_export_autoincrement
2 parents 5e69349 + e2e738a commit b358a52

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ public function checkProductBuyState($product = null)
567567
if ($option->getIsRequire()) {
568568
$customOption = $this->getProduct($product)
569569
->getCustomOption(self::OPTION_PREFIX . $option->getId());
570-
if (!$customOption || strlen($customOption->getValue()) == 0) {
570+
if (!$customOption || $customOption->getValue() === null || strlen($customOption->getValue()) === 0) {
571571
$this->getProduct($product)->setSkipCheckRequiredOption(true);
572572
Mage::throwException(
573573
Mage::helper('catalog')->__('The product has required options')

app/code/core/Mage/Core/Helper/Abstract.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@ function ($matches) {
250250
*/
251251
public function stripTags($data, $allowableTags = null, $escape = false)
252252
{
253+
if ($data === null) {
254+
return '';
255+
}
253256
$result = strip_tags($data, $allowableTags);
254257
return $escape ? $this->escapeHtml($result, $allowableTags) : $result;
255258
}

0 commit comments

Comments
 (0)