Skip to content

Commit 2663ff4

Browse files
committed
chore: remove trailing space
1 parent 37dbcf7 commit 2663ff4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/Model/Product/Attribute/Repository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public function getCustomAttributesMetadata($dataObjectClassName = null)
220220
protected function generateCode($label)
221221
{
222222
$code = substr(preg_replace('/[^a-zA-Z_0-9]/', '_', $this->filterManager->translitUrl($label)), 0, Attribute::ATTRIBUTE_CODE_MAX_LENGTH);
223-
$validatorAttrCode = new \Zend_Validate_Regex(['pattern' => '/^[a-zA-Z][a-zA-Z_0-9]{0,29}[a-zA-Z0-9]$/']);
223+
$validatorAttrCode = new \Zend_Validate_Regex(['pattern' => '/^[a-zA-Z][a-zA-Z_0-9]{0,29}[a-zA-Z0-9]$/']);
224224
if (!$validatorAttrCode->isValid($code)) {
225225
$code = 'attr_' . ($code ?: substr(md5(time()), 0, 8));
226226
}

0 commit comments

Comments
 (0)