- πΊπΈUnited States Trey
Is there anything needed for this patch? I'm happy to help test or anything else I can do.
- last update
almost 2 years ago 71 pass - last update
almost 2 years ago 71 pass
This one is easy to reproduce by creating a rules variable with an integer value of 0 (zero), then try to display a system message using its value from its token. The message will have the token replaced by an empty string rather than a string representation of the zero.
This is because rules_tokens() only provides replacements if !empty($data[$type]) -- and integer 0, float 0.0, and even string containing '0' all count as "empty".
Would there be harm in changing this logic? My initial reaction is to replace the call to empty() with a call to isset().
Needs review
2.0
Rules Core
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Is there anything needed for this patch? I'm happy to help test or anything else I can do.