Hey,
while working on cleanups for the internal error handling code,
specifically extracting different rendering logic into pluggable hooks (
https://github.com/php/php-src/pull/5484) I came across the ini settings
"xmlrpc_errors" and "xmlrpc_error_number", prominently integrated and used
in main/main.c
Both are used to allow users to change the display rendering of errors
while display_errors=1 and these settings were added in 2001 and nothing
changed much about this since then.
I am wondering if this code is not better moved to ext/xmlrpc extension
instead of being in main/main.c - this would be similar to how ext/soap
handles errors in the extension already.
Downsides:
- People can currently use this setting when doing their own xmlrpc,
however that anyone uses this setting looks so unlikely, because its global - With the potential unbundling of ext/xmlrpc this could also mean the ini
settings get moved out of core entirely.
Do you think this small BC break moving the settings to ext/xmlrpc is
acceptable as part of decoupling error displaying from php_error_cb and
main.c?
Has anyone seen this been used in a project?
Hey,
while working on cleanups for the internal error handling code,
specifically extracting different rendering logic into pluggable hooks (
https://github.com/php/php-src/pull/5484) I came across the ini settings
"xmlrpc_errors" and "xmlrpc_error_number", prominently integrated and used
in main/main.cBoth are used to allow users to change the display rendering of errors
while display_errors=1 and these settings were added in 2001 and nothing
changed much about this since then.I am wondering if this code is not better moved to ext/xmlrpc extension
instead of being in main/main.c - this would be similar to how ext/soap
handles errors in the extension already.Downsides:
- People can currently use this setting when doing their own xmlrpc,
however that anyone uses this setting looks so unlikely, because its global- With the potential unbundling of ext/xmlrpc this could also mean the ini
settings get moved out of core entirely.Do you think this small BC break moving the settings to ext/xmlrpc is
acceptable as part of decoupling error displaying from php_error_cb and
main.c?Has anyone seen this been used in a project?
Since display_errors=On is a development feature, we would not even
break production code if we removed it. Moving it to the xmlrpc
extension looks fine to me. If anybody will complain that they need the
setting for XMLRPC functionality which is not implemented on top of the
xmlrpc extension, we could still consider to offer a minimal extension
which just supports these INI settings. However, I do not expect
anybody complaining about that.
Thanks for working on disentangling the error handling!
--
Christoph M. Becker