Skip to content

Zend: always populate error pointer on failure of zend_is_callable() - #24435

Open
Girgias wants to merge 3 commits into
php:masterfrom
Girgias:2026-10-zend_is_callable_always_produce_error
Open

Girgias wants to merge 3 commits into
php:masterfrom
Girgias:2026-10-zend_is_callable_always_produce_error

Conversation

@Girgias

@Girgias Girgias commented Oct 19, 2026

Copy link
Copy Markdown
Member

Most of the code base expects an error to be set if a char* is provided, as this used to be always the case. It no longer was the case since the partially supported callables were deprecates as the deprecation could be promoted to an exception in which case we skipped allocating a char*.

The simple fix, allocate a char* even in case of an exception so callers don't need to check if it still NULL. This fixes some error messages at the same time.

Was hitting this again in #23105.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant