Skip to content

Commit

Permalink
Merge branch 'main' into version-info
Browse files Browse the repository at this point in the history
# Conflicts:
#	composer.lock
  • Loading branch information
sreichel committed Feb 1, 2025
2 parents 1633c45 + 488c021 commit c8e4424
Show file tree
Hide file tree
Showing 6 changed files with 168 additions and 1,785 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
/app/etc/modules/Cm_RedisSession.xml
/lib/Credis

# flow.js library
/js/lib/uploader

# TinyMCE library
/js/lib/tinymce

Expand Down
6 changes: 3 additions & 3 deletions app/code/core/Mage/Eav/Model/Attribute/Data/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function extractValue(Zend_Controller_Request_Http $request)
* Validate data
* Return true or array of errors
*
* @param array|string $value
* @param string|bool|null $value
* @return bool|array
*/
public function validateValue($value)
Expand All @@ -51,7 +51,7 @@ public function validateValue($value)
$value = $this->getEntity()->getDataUsingMethod($attribute->getAttributeCode());
}

if ($attribute->getIsRequired() && strlen($value) == 0) {
if ($attribute->getIsRequired() && (string) $value === '') {
$errors[] = Mage::helper('eav')->__('"%s" is a required value.', $label);
}

Expand All @@ -60,7 +60,7 @@ public function validateValue($value)
}

// validate length
$length = Mage::helper('core/string')->strlen(trim($value));
$length = Mage::helper('core/string')->strlen(trim((string) $value));

$validateRules = $attribute->getValidateRules();
if (!empty($validateRules['min_text_length']) && $length < $validateRules['min_text_length']) {
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"colinmollenhour/magento-redis-session": "^3.2.0",
"cweagans/composer-patches": "^1.7",
"ezyang/htmlpurifier": "^4.17",
"flowjs/flowjs": "dev-master",
"magento-hackathon/magento-composer-installer": "^3.1 || ^2.1 || ^4.0",
"mklkj/tinymce-i18n": "^24.11",
"openmage/composer-plugin": "^3.0",
Expand Down
Loading

0 comments on commit c8e4424

Please sign in to comment.