cvs: /php3 ChangeLog /php3/functions xml.c
| From: | Thies C. Arntzen | Date: | Wed, 20 Oct 1999 15:14:35 +0000 |
| Subject: | cvs: /php3 ChangeLog /php3/functions xml.c | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-11785@lists.php.net to get a copy of this message | ||
thies Wed Oct 20 11:14:35 1999 EDT
Modified files:
/php3 ChangeLog
/php3/functions xml.c
Log:
fixed cdata bug in xml_parse_into_struct
Index: php3/ChangeLog
diff -u php3/ChangeLog:1.780 php3/ChangeLog:1.781
--- php3/ChangeLog:1.780 Wed Oct 13 13:49:33 1999
+++ php3/ChangeLog Wed Oct 20 11:14:27 1999
@@ -2,6 +2,7 @@
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
???? ??, 1999, Version 3.0.13
+- XML_Parse_Into_Struct() no longer eats data. (Thies)
- Added portable access to stdio streams by using the
"php://stream-name" syntax (Sascha)
- Fixed zombie problem when using backquotes. eg: $x =
ls /; (Thies)
Index: php3/functions/xml.c
diff -u php3/functions/xml.c:1.27 php3/functions/xml.c:1.28
--- php3/functions/xml.c:1.27 Sun Jun 20 20:40:57 1999
+++ php3/functions/xml.c Wed Oct 20 11:14:31 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xml.c,v 1.27 1999/06/21 00:40:57 jim Exp $ */
+/* $Id: xml.c,v 1.28 1999/10/20 15:14:31 thies Exp $ */
#define IS_EXT_MODULE
#if COMPILE_DL
# if PHP_31
@@ -824,7 +824,18 @@
}
if (doprint || (! parser->skipwhite)) {
if (parser->lastwasopen) {
- add_assoc_string(parser->ctag,"value",decoded_value,0);
+ pval *myval;
+
+ /* check if the current tag already has a value - if yes append to that! */
+ if
(_php3_hash_find(parser->ctag->value.ht,"value",sizeof("value"),(void *)
&myval) == SUCCESS) {
+ int newlen = myval->value.str.len + decoded_len;
+ myval->value.str.val = erealloc(myval->value.str.val,newlen);
+ strcpy(myval->value.str.val + myval->value.str.len,decoded_value);
+ myval->value.str.len += decoded_len;
+ efree(decoded_value);
+ } else {
+ add_assoc_string(parser->ctag,"value",decoded_value,0);
+ }
} else {
pval tag;