Skip to content

Commit 1db9869

Browse files
authored
Custom option null deprecation (#3731)
* Fixed strlen($customOption->getValue()) null deprecation. * Fixed strlen($customOption->getValue()) null deprecation.
1 parent 11eca9d commit 1db9869

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-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')

0 commit comments

Comments
 (0)