[Bug]: Custom attributes with code 0
Author: vuminh224Created Sep 25, 2026Updated Sep 25, 2026
LabelsBug
Pre-submission checklist
- I have searched the existing issues and this bug has not already been reported.
UnoPim Version(s) affected
3.0.0
Issue Description
The issue when we tried to assign a value ( in this case is code 0 ) for attributes. It will reject and don't assign at all
Preconditions (environment)
- PHP version:
- Database (MySQL/PostgreSQL + version):
- Elasticsearch version (or "not used"):
- Web server:
- OS: Ubuntu 26.04
- Browser: Chromium
Steps to reproduce
- Create a new custom attribute, type SELECT
- After the creation, in options, create new few options, in my case I got 3 options with code: 0 - 1 - 2
- Assign product with option 1 or 2 and save => It works
- Assign product with option 0 and save => The product will remove this option
Expected Result
Normally it will assign
Actual Result
This option will go blank ( as non chosen / not used )
Screenshots
No response
Additional Context
I think this is because UnoPIM is built by PHP so each time I go code 0 it turn into False so I would love to see ERR if we tried to define code 0 for options
Source: unopim/unopim