- Added implementation of curl_multi_info_read(). (Brian)
- Added RFC2397 (data: stream) support. (Marcus)
- Fixed handling of extremely long paths inside tempnam() function. (Ilia)
+- Fixed bug #37587 (var without attribute causes segfault). (Marcus)
- Fixed bug #37565 (Using reflection::export with simplexml causing a crash).
(Marcus)
- Fixed bug #37563 (array_key_exists performance is poor for &$array). (Ilia)
--- /dev/null
+--TEST--
+Bug #37587 (var without attribute causes segfault)
+--FILE--
+<?php
+
+var_dump(wddx_deserialize(file_get_contents(<<<EOF
+data:,<wddxPacket version='1.0'>
+<header/>
+<data>
+ <array length='1'>
+ <var>
+ <struct>
+ <var name='test'><string>Hello World</string></var>
+ </struct>
+ </var>
+ </array>
+</data>
+</wddxPacket>
+EOF
+)));
+
+?>
+===DONE===
+--EXPECT--
+array(1) {
+ [0]=>
+ array(1) {
+ ["test"]=>
+ string(11) "Hello World"
+ }
+}
+===DONE===
+--UEXPECT--
+array(1) {
+ [0]=>
+ array(1) {
+ [u"test"]=>
+ string(11) "Hello World"
+ }
+}
+===DONE===
if (!strcmp(name, EL_PACKET)) {
int i;
- for (i=0; atts[i]; i++) {
+ if (atts) for (i=0; atts[i]; i++) {
if (!strcmp(atts[i], EL_VERSION)) {
/* nothing for now */
}
} else if (!strcmp(name, EL_CHAR)) {
int i;
- for (i = 0; atts[i]; i++) {
+ if (atts) for (i = 0; atts[i]; i++) {
if (!strcmp(atts[i], EL_CHAR_CODE) && atts[++i] && atts[i][0]) {
char tmp_buf[2];
} else if (!strcmp(name, EL_BOOLEAN)) {
int i;
- for (i = 0; atts[i]; i++) {
+ if (atts) for (i = 0; atts[i]; i++) {
if (!strcmp(atts[i], EL_VALUE) && atts[++i] && atts[i][0]) {
ent.type = ST_BOOLEAN;
SET_STACK_VARNAME;
} else if (!strcmp(name, EL_VAR)) {
int i;
- for (i = 0; atts[i]; i++) {
+ if (atts) for (i = 0; atts[i]; i++) {
if (!strcmp(atts[i], EL_NAME) && atts[++i] && atts[i][0]) {
char *decoded;
int decoded_len;
MAKE_STD_ZVAL(ent.data);
array_init(ent.data);
- for (i = 0; atts[i]; i++) {
+ if (atts) for (i = 0; atts[i]; i++) {
if (!strcmp(atts[i], "fieldNames") && atts[++i] && atts[i][0]) {
zval *tmp;
char *key;
ent.varname = NULL;
ent.data = NULL;
- for (i = 0; atts[i]; i++) {
+ if (atts) for (i = 0; atts[i]; i++) {
if (!strcmp(atts[i], EL_NAME) && atts[++i] && atts[i][0]) {
char *decoded;
int decoded_len;