Skip to content

[13.x] Treat dotted keys literally in ArrayStore::touch() - #61777

Merged
taylorotwell merged 1 commit into
laravel:13.xfrom
Button99:13.x
Sep 29, 2026
Merged

taylorotwell merged 1 commit into
laravel:13.xfrom
Button99:13.x

Conversation

@Button99

Copy link
Copy Markdown
Contributor

ArrayStore::touch() uses Arr::get() to locate entries, which interprets missing dotted keys as paths into internal storage.

After storing an array under profile, touch('profile.value', 60) returns true and creates a malformed entry, even though that cache key does not exist. Later reads of it emit "Undefined array key" warnings, and touch('profile.expiresAt', 60), which resolves to a scalar, throws Error: Cannot use a scalar value as an array.

This change uses direct array lookup, consistent with get() and put(), so cache keys are treated literally.

@taylorotwell
taylorotwell merged commit de11d6d into laravel:13.x Sep 29, 2026
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants