domxml patch
| From: | Rob Richards | Date: | Wed, 05 Jun 2002 15:15:47 +0000 |
| Subject: | domxml patch | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-84895@lists.php.net to get a copy of this message | ||
can someone apply this patch to cvs for me.
it fixes a problem in domxml_dump_mem_file with xmlKeepBlanksDefault not
being reset when the formatting parameter is true.
same problem that was in domxml_dump_mem, but missed this function
yesterday.
thanks
rob
Index: php_domxml.c =================================================================== RCS file: /repository/php4/ext/domxml/php_domxml.c,v retrieving revision 1.163 diff -u -r1.163 php_domxml.c --- php_domxml.c 4 Jun 2002 14:30:12 -0000 1.163 +++ php_domxml.c 5 Jun 2002 15:02:05 -0000 @@ -3274,7 +3274,7 @@ { zval *id; xmlDoc *docp; - int file_len, bytes; + int file_len, bytes, keepblanks; int format = 0; int compressmode = 0; char *file; @@ -3284,8 +3284,9 @@ xmlSetCompressMode(compressmode); if (format) { - xmlKeepBlanksDefault(0); + keepblanks = xmlKeepBlanksDefault(0); bytes = xmlSaveFormatFile(file, docp, format); + xmlKeepBlanksDefault(keepblanks); } else { bytes = xmlSaveFile(file, docp); }
Index: php_domxml.c =================================================================== RCS file: /repository/php4/ext/domxml/php_domxml.c,v retrieving revision 1.163 diff -u -r1.163 php_domxml.c --- php_domxml.c 4 Jun 2002 14:30:12 -0000 1.163 +++ php_domxml.c 5 Jun 2002 15:02:05 -0000 @@ -3274,7 +3274,7 @@ { zval *id; xmlDoc *docp; - int file_len, bytes; + int file_len, bytes, keepblanks; int format = 0; int compressmode = 0; char *file; @@ -3284,8 +3284,9 @@ xmlSetCompressMode(compressmode); if (format) { - xmlKeepBlanksDefault(0); + keepblanks = xmlKeepBlanksDefault(0); bytes = xmlSaveFormatFile(file, docp, format); + xmlKeepBlanksDefault(keepblanks); } else { bytes = xmlSaveFile(file, docp); }