Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] Fix "Undefined variable $key" error with Marketplace API Client #10854

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

duncanmcclean
Copy link
Member

In #10815, we introduced caching and locking around requests to Statamic's Marketplace API.

However, when the lock times out and we want to serve the cached response, an error would occur complainging that the $key variable was undefined. This PR should fix that by defining it outside of the try/catch statement.

@jasonvarga
Copy link
Member

Those lines could still be inside the try/catch, they just needed to be before the $lock->block(5).

@jasonvarga jasonvarga merged commit e3a144d into 5.x Sep 27, 2024
18 checks passed
@jasonvarga jasonvarga deleted the fix/marketplace-api-lock-timeout branch September 27, 2024 15:11
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