]> granicus.if.org Git - php/commitdiff
Make 2nd arg of xml_set_object by value
authorNikita Popov <nikic@php.net>
Thu, 10 Dec 2015 22:33:55 +0000 (23:33 +0100)
committerNikita Popov <nikic@php.net>
Thu, 10 Dec 2015 22:35:25 +0000 (23:35 +0100)
The argument is not being modified. Probably holdover from PHP 4
days.

ext/xml/xml.c

index bcded6203abbb16880657e493bce569a3809b31a..6969c5b5106a4648eab26955941bf171a2548e1c 100644 (file)
@@ -111,7 +111,7 @@ ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xml_set_object, 0, 0, 2)
        ZEND_ARG_INFO(0, parser)
-       ZEND_ARG_INFO(1, obj)
+       ZEND_ARG_INFO(0, obj)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xml_set_element_handler, 0, 0, 3)
@@ -1169,7 +1169,7 @@ PHP_FUNCTION(xml_set_object)
        xml_parser *parser;
        zval *pind, *mythis;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS(), "ro/", &pind, &mythis) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS(), "ro", &pind, &mythis) == FAILURE) {
                return;
        }