File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/code/core/Mage/Eav/Model/Attribute/Data Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public function extractValue(Zend_Controller_Request_Http $request)
3737 * Validate data
3838 * Return true or array of errors
3939 *
40- * @param array| string $value
40+ * @param string|bool|null $value
4141 * @return bool|array
4242 */
4343 public function validateValue ($ value )
@@ -51,7 +51,7 @@ public function validateValue($value)
5151 $ value = $ this ->getEntity ()->getDataUsingMethod ($ attribute ->getAttributeCode ());
5252 }
5353
54- if ($ attribute ->getIsRequired () && strlen ( $ value) == 0 ) {
54+ if ($ attribute ->getIsRequired () && ( string ) $ value === '' ) {
5555 $ errors [] = Mage::helper ('eav ' )->__ ('"%s" is a required value. ' , $ label );
5656 }
5757
@@ -60,7 +60,7 @@ public function validateValue($value)
6060 }
6161
6262 // validate length
63- $ length = Mage::helper ('core/string ' )->strlen (trim ($ value ));
63+ $ length = Mage::helper ('core/string ' )->strlen (trim (( string ) $ value ));
6464
6565 $ validateRules = $ attribute ->getValidateRules ();
6666 if (!empty ($ validateRules ['min_text_length ' ]) && $ length < $ validateRules ['min_text_length ' ]) {
You can’t perform that action at this time.
0 commit comments