Skip to content

Commit

Permalink
MFH: allow NULL prefix to create default namespace
Browse files Browse the repository at this point in the history
fix tests
  • Loading branch information
Rob Richards committed Dec 9, 2005
1 parent ca42324 commit cc96967
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions ext/xmlwriter/php_xmlwriter.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ PHP_FUNCTION(xmlwriter_write_attribute_ns)

if (this) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssss",
&name, &name_len, &content, &content_len) == FAILURE) {
&prefix, &prefix_len, &name, &name_len, &uri, &uri_len, &content, &content_len) == FAILURE) {
return;
}
XMLWRITER_FROM_OBJECT(intern, this);
Expand Down Expand Up @@ -743,15 +743,15 @@ PHP_FUNCTION(xmlwriter_start_element_ns)
zval *this = getThis();

if (this) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!ss",
&prefix, &prefix_len, &name, &name_len, &uri, &uri_len) == FAILURE) {
return;
}
XMLWRITER_FROM_OBJECT(intern, this);
} else
#endif
{
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsss", &pind,
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs!ss", &pind,
&prefix, &prefix_len, &name, &name_len, &uri, &uri_len) == FAILURE) {
return;
}
Expand Down Expand Up @@ -839,15 +839,15 @@ PHP_FUNCTION(xmlwriter_write_element_ns)
zval *this = getThis();

if (this) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssss",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!sss",
&prefix, &prefix_len, &name, &name_len, &uri, &uri_len, &content, &content_len) == FAILURE) {
return;
}
XMLWRITER_FROM_OBJECT(intern, this);
} else
#endif
{
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rssss", &pind,
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs!sss", &pind,
&prefix, &prefix_len, &name, &name_len, &uri, &uri_len, &content, &content_len) == FAILURE) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion ext/xmlwriter/tests/009.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ xmlwriter_write_pi($xw, 'php', 'echo "hello world"; ');
xmlwriter_end_element($xw);
xmlwriter_start_element($xw, 'cdata');
xmlwriter_start_cdata($xw);
xmlwriter_end_element($xw);
xmlwriter_text($xw, '<>&"');
xmlwriter_end_cdata($xw);
xmlwriter_end_element($xw);
xmlwriter_end_element($xw);
xmlwriter_end_element($xw);
xmlwriter_end_document($xw);
// Force to write and empty the buffer
$output = xmlwriter_flush($xw, true);
Expand Down
2 changes: 1 addition & 1 deletion ext/xmlwriter/tests/OO_009.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ $xw->writePi('php', 'echo "hello world"; ');
$xw->endElement();
$xw->startElement('cdata');
$xw->startCdata();
$xw->endElement();
$xw->text('<>&"');
$xw->endCdata();
$xw->endElement();
$xw->endElement();
$xw->endElement();
$xw->endDocument();
// Force to write and empty the buffer
$output = $xw->flush(true);
Expand Down

0 comments on commit cc96967

Please sign in to comment.