Skip to content

Conversation

jhdxr
Copy link
Member

@jhdxr jhdxr commented Apr 30, 2016

The original implement use xmlDocDumpFormatMemory which does not support XML_SAVE_NO_DECL, so I replace them with xmlsave api.

xmlSaveNoEmptyTags = saveempty;
}
if (!size) {
if(xmlSaveDoc(xscp, docp) < 0) {
RETURN_FALSE;
Copy link
Contributor

@staabm staabm Apr 30, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaks the buf (in all Return cases above)

php_error_docref(NULL, E_WARNING, "Could not fetch buffer");
RETURN_FALSE;
}
xmlSaveCtxtPtr xscp = xmlSaveToBuffer(buf, docp->encoding, options);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C89 doesn't allow mixing declarations and statements, so please move the declaration up to the start of the block.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@krakjoe
Copy link
Member

krakjoe commented Jan 3, 2017

@jhdxr fix conflicts please :)

# Conflicts:
#	ext/dom/document.c
@jhdxr
Copy link
Member Author

jhdxr commented Jan 3, 2017

@krakjoe I have merged master and resolved the conflicts, however it seems the master branch is broken for now, so the ci fails. I'll check it later.

@krakjoe
Copy link
Member

krakjoe commented Jan 27, 2017

@jhdxr bump, status please ?

@jhdxr
Copy link
Member Author

jhdxr commented Jan 28, 2017

@krakjoe done :)

@krakjoe
Copy link
Member

krakjoe commented Jan 28, 2017

Not able to apply:

Applying: fix bug #50989 add support LIBXML_NOXMLDECL for DOMDocument::saveXML()
error: patch failed: ext/dom/document.c:1633
error: ext/dom/document.c: patch does not apply

@jhdxr jhdxr mentioned this pull request Jan 28, 2017
@jhdxr
Copy link
Member Author

jhdxr commented Jan 28, 2017

I've created a new pr #2346 so I'm closing this one. @krakjoe

@jhdxr jhdxr closed this Jan 28, 2017
@jhdxr jhdxr deleted the bugfix/50989 branch January 28, 2017 11:27
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.

5 participants