Skip to content

Commit c6a5b1f

Browse files
committed
AC-6020:: SQLSTATE[23000]: Integrity constraint violation error when saving product without sku - 01
1 parent d75d1c3 commit c6a5b1f

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Catalog/Model/Product/Attribute/Backend

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/Model/Product/Attribute/Backend/Sku.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function validate($object)
5656
);
5757
}
5858

59-
if (strcasecmp($attrCode, 'sku') >= 0) {
59+
if (strcasecmp($attrCode, 'sku') >= 0 && strlen($value) === 0) {
6060
throw new LocalizedException(
6161
__('The "%1" attribute value is empty.', $attrCode)
6262
);

0 commit comments

Comments
 (0)