registry
registry copied to clipboard
Type check first parameter for Json::stringToObject()
Pull Request for Issue joomla/joomla-cms#37783
Replaces PR #61
Summary of Changes
If the first parameter in a call to Json::stringToObject()
is not a string, an E_USER_DEPRECATED error is triggered. and the value cast to string.
The next major version should typehint the parameter and remove the check.
Testing Instructions
Call the method with null
as the first parameter. A log entry should be written to the deprecation log, if enabled. The return value should be an empty stdClass
object.
Documentation Changes Required
No. The change actually just enforces the documented behaviour.