Skip to content

Commit

Permalink
Fix bug on unable to clear date and datetime attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
kiatng committed Feb 24, 2025
1 parent ac1a34c commit d62ceb1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/code/core/Mage/Eav/Model/Attribute/Data/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,11 @@ public function validateValue($value)
*/
public function compactValue($value)
{
if ($value !== false) {
if (empty($value)) {
$value = null;
}
$this->getEntity()->setDataUsingMethod($this->getAttribute()->getAttributeCode(), $value);
if (empty($value)) {
$value = null;
}
$this->getEntity()->setDataUsingMethod($this->getAttribute()->getAttributeCode(), $value);

return $this;
}

Expand Down

0 comments on commit d62ceb1

Please sign in to comment.