. Fixed bug #70529 (Session read causes "String is not zero-terminated" error).
(Yasuo)
+- XMLRPC
+ . Fixed bug #70526 (xmlrpc_set_type returns false on success). (Laruence)
17 Sep 2015, PHP 7.0.0 RC 3
--- /dev/null
+--TEST--
+Bug #70526 (xmlrpc_set_type returns false on success)
+--SKIPIF--
+<?php
+if (!extension_loaded("xmlrpc")) print "skip";
+?>
+--FILE--
+<?php
+$params = date("Ymd\TH:i:s", time());
+$rv = xmlrpc_set_type($params, 'datetime');
+var_dump($rv);
+?>
+--EXPECT--
+bool(true)
convert_to_object(value);
if (zend_hash_str_update(Z_OBJPROP_P(value), OBJECT_TYPE_ATTR, sizeof(OBJECT_TYPE_ATTR) - 1, &type)) {
- bSuccess = zend_hash_str_update(Z_OBJPROP_P(value), OBJECT_VALUE_TS_ATTR, sizeof(OBJECT_VALUE_TS_ATTR) - 1, &ztimestamp) != NULL;
+ bSuccess = (zend_hash_str_update(Z_OBJPROP_P(value), OBJECT_VALUE_TS_ATTR, sizeof(OBJECT_VALUE_TS_ATTR) - 1, &ztimestamp) != NULL)? SUCCESS : FAILURE;
}
} else {
zval_ptr_dtor(&type);
}
} else {
convert_to_object(value);
- bSuccess = zend_hash_str_update(Z_OBJPROP_P(value), OBJECT_TYPE_ATTR, sizeof(OBJECT_TYPE_ATTR) - 1, &type) != NULL;
+ bSuccess = (zend_hash_str_update(Z_OBJPROP_P(value), OBJECT_TYPE_ATTR, sizeof(OBJECT_TYPE_ATTR) - 1, &type) != NULL)? SUCCESS : FAILURE;
}
}
}