Skip to content

3.0.4: fix(store): bind store_id as string to stop char-column DOUBLE coercion

Choose a tag to compare

@gp247net gp247net released this 05 Sep 04:21
· 10 commits to master since this release
store_id columns are uuid/char(36) but GP247_STORE_ID_ROOT/GLOBAL were int, so
->where('store_id', <int>) forced MySQL to coerce the whole char column to DOUBLE
and threw "1292 Truncated incorrect DOUBLE value: 'STO-xxx'" as soon as a
non-numeric store id existed (e.g. saving ADMIN_NAME on a multi-store site).

- Const.php: GP247_STORE_ID_ROOT/GLOBAL int -> string '1'/'0' (fixes all derived
  bindings: app.storeId, adminStoreId, resolver, ConfigForm::storeId(), ~161 uses).
- ConfigForm: cast store_id query bindings to (string) (belt + reported path).

No data migration; 0 strict === comparisons against the constants.
Refs US-CMP-store-id-string-binding, ADR compat-foundation_store-id-string-identity,
RISK-TECH-store-id-numeric-coercion, mod 20260905T100500.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>