The functions derived non-const pointers from a const-pointer, which is not
correct. Since php/php-src#19854 no `const` pointers are passed into these
functions, so we can just make the parameter non-const.
* uri: Take `uri_object_t` in `uri_get_debug_properties()`
* uri: Take `uri_object_t` as `base_url_object` in `php_uri_instantiate_uri()`
* uri: Take `uri_object_t` as `that_object` in `uri_equals()`
* uri: Take `this_object` a `uri_object_t` in `uri_equals()`
* uri: Take `uri_object_t` in `throw_cannot_recompose_uri_to_string()`
This happened implicitly in the past due to EX(opline) being used - or in the hybrid VM case, the implicit LOAD_OPLINE() happening as part of ZEND_VM_ENTER().
With 76d7c616bb opline is used standalone and the return value of zend_interrupt_helper_SPEC ignored. Make use of it...
Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
Since the ini message handlers already check for basedir, we need to
drop the basedir check from ini_set. Then we also fix the exceptional
case for the empty string: it should bypass the basedir check.
Furthermore, there was a regression introduced with the error_log
"syslog" check in ddfe269a (inverted check), so we fix that as well.
Closes GH-19487
* uri: Add `UriError`
* uri: Throw `UriError` for unexpected failures in uri_parser_rfc3986
This is a follow-up for php/php-src#19779 which updated the error *messages*
for the non-syntax errors, but did not update the exception class, still
implying it's related to invalid URIs.
Given that we don't know ourselves if these are reachable in practice, they are
cannot be meaningfully handled by a user of PHP. Thus this should be a `Error`
according to our exception policy.
* uri: Throw `UriError` when unable to recompose URIs
* uri: Throw `UriError` when unable to read component
* NEWS
Don't access fbc->op_array.refcount on internal function. Don't attempt to cache
ZEND_ACC_USER_ARG_INFO at all, which is only used in
zend_get_closure_invoke_method(). This may reuse arg_info from a temporary
closure, and hence caching would also be unsafe.
Also avoid populating the cache slot for variadic parameters, where the
ZEND_ACC_USER_ARG_INFO is set for the same reason.
Closes GH-19856
* zend_hash: Assert that the `interned` parameter is not a lie
While investigating php/php-src#19842 I was wondering why non-interned string
didn't cause troubles, until I realized it was the value instead of the key.
Nevertheless it appears useful to check that the key is actually interned as
claimed by the caller to prevent hard-to-find bugs.
* zend_hash: Rename `interned` parameter name to `key_guaranteed_interned`