]> granicus.if.org Git - php/commit
Don't return temporary from SXE write_property handler
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 25 Aug 2020 09:27:58 +0000 (11:27 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 25 Aug 2020 09:28:44 +0000 (11:28 +0200)
commitf4e9d0e32508249aca195b177c943d63c420666f
treead38d46cda3cd4428b9268170094dfa4e22862e0
parentafde6dcf5f3c82aa4a03f1acdd0a17daa6bc644a
Don't return temporary from SXE write_property handler

Return the original value. If we don't return the original value,
we need to own the zval, which we don't.

For clarity also switch things to work on a zend_string* value
instead of a zval*.
ext/simplexml/simplexml.c
ext/simplexml/tests/038.phpt [new file with mode: 0644]