call constructor). (Anatol)
- SPL:
+ . Fixed bug #71838 (Deserializing serialized SPLObjectStorage-Object can't
+ access properties in PHP). (Nikita)
+ . Fixed bug #52339 (SPL autoloader breaks class_exists()). (Nikita)
+ . Fixed bug #67582 (Cloned SplObjectStorage with overwritten getHash fails
+ offsetExists()). (Nikita)
- Standard:
+ . Fixed bug #71837 (Wrong arrays behaviour). (Laruence)
. Fixed bug #71840 (Unserialize accepts wrongly data). (Ryat, Laruence)
-31 Marc 2016, PHP 5.6.20
+31 Mar 2016 PHP 7.0.5
- CLI Server:
. Fixed bug #69953 (Support MKCALENDAR request method). (Christoph)
intern->index = 0;
} /* }}} */
-static zend_object_value spl_object_storage_new_ex(zend_class_entry *class_type, spl_SplObjectStorage **obj, zval *orig TSRMLS_DC) /* {{{ */
+static zend_object *spl_object_storage_new_ex(zend_class_entry *class_type, zval *orig) /* {{{ */
{
- zend_object_value retval;
spl_SplObjectStorage *intern;
- zend_class_entry *parent = class_type;
+ zend_class_entry *parent = class_type;
- intern = emalloc(sizeof(spl_SplObjectStorage));
- memset(intern, 0, sizeof(spl_SplObjectStorage));
- *obj = intern;
+ intern = emalloc(sizeof(spl_SplObjectStorage) + zend_object_properties_size(parent));
+ memset(intern, 0, sizeof(spl_SplObjectStorage) - sizeof(zval));
+ intern->pos = HT_INVALID_IDX;
- zend_object_std_init(&intern->std, class_type TSRMLS_CC);
+ zend_object_std_init(&intern->std, class_type);
object_properties_init(&intern->std, class_type);
- zend_hash_init(&intern->storage, 0, NULL, (void (*)(void *))spl_object_storage_dtor, 0);
+ zend_hash_init(&intern->storage, 0, NULL, spl_object_storage_dtor, 0);
- retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) spl_SplOjectStorage_free_storage, NULL TSRMLS_CC);
- retval.handlers = &spl_handler_SplObjectStorage;
+ intern->std.handlers = &spl_handler_SplObjectStorage;
- if (orig) {
- spl_SplObjectStorage *other = Z_SPLOBJSTORAGE_P(orig);
- spl_object_storage_addall(intern, orig, other);
- }
-
while (parent) {
if (parent == spl_ce_SplObjectStorage) {
if (class_type != spl_ce_SplObjectStorage) {
parent = parent->parent;
}
- spl_SplObjectStorage *other = (spl_SplObjectStorage*)zend_object_store_get_object(orig TSRMLS_CC);
- spl_object_storage_addall(intern, orig, other TSRMLS_CC);
+ if (orig) {
- return retval;
++ spl_SplObjectStorage *other = Z_SPLOBJSTORAGE_P(orig);
++ spl_object_storage_addall(intern, orig, other);
+ }
+
+ return &intern->std;
}
/* }}} */