mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Use zend_parse_parameters_none() in XmlWriter::openMemory()
And fix incorrect uses in tests
This commit is contained in:
parent
6e17fbefde
commit
d94a1907b7
@ -1700,6 +1700,10 @@ static PHP_FUNCTION(xmlwriter_open_memory)
|
||||
zval *self = getThis();
|
||||
ze_xmlwriter_object *ze_obj = NULL;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (self) {
|
||||
/* We do not use XMLWRITER_FROM_OBJECT, xmlwriter init function here */
|
||||
ze_obj = Z_XMLWRITER_P(self);
|
||||
|
@ -5,8 +5,7 @@ XMLWriter: libxml2 XML Writer, membuffer, flush
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$doc_dest = '002.xml';
|
||||
$xw = xmlwriter_open_memory($doc_dest);
|
||||
$xw = xmlwriter_open_memory();
|
||||
xmlwriter_start_document($xw, '1.0', 'UTF-8');
|
||||
xmlwriter_start_element($xw, "tag1");
|
||||
xmlwriter_end_document($xw);
|
||||
|
@ -5,8 +5,7 @@ XMLWriter: libxml2 XML Writer, membuffer, flush, attribute
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$doc_dest = '003.xml';
|
||||
$xw = xmlwriter_open_memory($doc_dest);
|
||||
$xw = xmlwriter_open_memory();
|
||||
xmlwriter_start_document($xw, '1.0', 'UTF-8');
|
||||
xmlwriter_start_element($xw, "tag1");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user