You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug Bug Description
This issue occurs when using GeneaLabs Laravel Model Caching with an Eloquent query that includes a whereIn condition containing percentage (%) symbols in string values. The error "Missing format specifier at end of string" is triggered by vsprintf in CacheKey.php, where the percentage symbol is mistakenly interpreted as a format specifier.
Possible Cause
The vsprintf function expects valid format specifiers (e.g., %s, %d), but a raw % in the query value is incorrectly processed, leading to a ValueError.
Suggested Fix
Escaping percentage symbols or modifying how vsprintf is used in GeneaLabs Model Caching could prevent this issue.
Eloquent Query
Please provide the complete eloquent query that caused the bug, for example:
Thanks for reporting this @JkappenFlashpoint. Any chance you could create a PR with a failing test? That would just help get the ball rolling. Thanks :) Also to note, any fixes will only be applied to the latest version, in this case 12.x. Are you able to install version 12 of Model Caching? If so, does the error still occur there?
Describe the bug
Bug Description
This issue occurs when using GeneaLabs Laravel Model Caching with an Eloquent query that includes a whereIn condition containing percentage (%) symbols in string values. The error "Missing format specifier at end of string" is triggered by vsprintf in CacheKey.php, where the percentage symbol is mistakenly interpreted as a format specifier.
Possible Cause
The vsprintf function expects valid format specifiers (e.g., %s, %d), but a raw % in the query value is incorrectly processed, leading to a ValueError.
Suggested Fix
Escaping percentage symbols or modifying how vsprintf is used in GeneaLabs Model Caching could prevent this issue.
Eloquent Query
Please provide the complete eloquent query that caused the bug, for example:
Stack Trace
Environment
The text was updated successfully, but these errors were encountered: