Problem/Motivation
When loose comparison (++)
is used, PHP changes casts values to different types to see if they match. This means numeric strings may be considered equal even if their string values are different.
Steps to reproduce
- Set a field value to 1.
- Try to change it to +1.
- Drupal sees the field as unchanged.
Proposed resolution
Use exact comparison to check if field has changed.
Remaining tasks
- Create merge request.
- Create tests.
- Review.
- Merge.
User interface changes
None.
Introduced terminology
None.
API changes
None.
Data model changes
None.