This PR guards against PHP fatal errors when resolving OpenGraph data, by defensively type casting any resolve callbacks that return a specific PHP type.
Why
RM doesn't sanitize for types when using custom open graph values. This is readily apparent in RM pro, but also afffects RM free, due to how filters get applied.
Fixes #98
How
Testing Instructions
Additional Info
Checklist:
[x] My code is tested to the best of my abilities.
[x] My code follows the WordPress Coding Standards.
[x] My code has proper inline documentation.
[x] I have added unit tests to verify the code works as intended.
[x] The changes in this PR have been noted in CHANGELOG.md
What
This PR guards against PHP fatal errors when resolving
OpenGraph
data, by defensively type casting anyresolve
callbacks that return a specific PHP type.Why
RM doesn't sanitize for types when using custom open graph values. This is readily apparent in RM pro, but also afffects RM free, due to how filters get applied.
Fixes #98
How
Testing Instructions
Additional Info
Checklist: