Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/Attribute/Decimal.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ public function searchFor($strPattern)
return $query->fetchAll(\PDO::FETCH_COLUMN, 'id');
}

/**
* {@inheritDoc}
*
* This is needed for compatibility with MySQL strict mode so we will not write an empty string to decimal col.
*/
public function serializeData($value)
{
return $value === '' ? null : $value;
}

/**
* Filter all values by specified operation.
*
Expand Down