Description
When local fields are disabled (via acf_disable_local() or the acf/settings/local filter), acf_get_local_store() (includes/local-fields.php:87-93) returns the shared local-empty "dummy" store — but it is a normal writable ACF_Data store. Registrations made while local is disabled silently accumulate there instead of being rejected, and the same dummy instance is shared between the fields and groups paths.
Low severity (the data is never read while disabled), but it is a foot-gun: re-enabling local does not surface those registrations, and the accumulated state can confuse debugging.
Reproduction
Characterized in #450: tests/php/includes/test-local-fields.php::test_local_setting_filter_disables_local (resets the dummy store in teardown to avoid cross-test pollution).
Suggested fix
Return a write-discarding store (no-op set/append), or reset the dummy store when toggling.
Found during the 2026-06 test campaign (see PR #450).
Description
When local fields are disabled (via
acf_disable_local()or theacf/settings/localfilter),acf_get_local_store()(includes/local-fields.php:87-93) returns the sharedlocal-empty"dummy" store — but it is a normal writableACF_Datastore. Registrations made while local is disabled silently accumulate there instead of being rejected, and the same dummy instance is shared between the fields and groups paths.Low severity (the data is never read while disabled), but it is a foot-gun: re-enabling local does not surface those registrations, and the accumulated state can confuse debugging.
Reproduction
Characterized in #450:
tests/php/includes/test-local-fields.php::test_local_setting_filter_disables_local(resets the dummy store in teardown to avoid cross-test pollution).Suggested fix
Return a write-discarding store (no-op
set/append), or reset the dummy store when toggling.Found during the 2026-06 test campaign (see PR #450).