diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-15 14:43:55 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-15 14:43:55 +0100 |
commit | f39e821c7e3f0fda3bb5a266153e6a0fde944a97 (patch) | |
tree | e6160f546d54b2abe80ef1fcdc4e3893660dee99 /ext/opcache/zend_persist.c | |
parent | 27d9800b1d9d37bc6eacb1000cf63f3f1237b742 (diff) | |
parent | e6e9bea25798068ff3c9135515e5d000fe70a43b (diff) | |
download | php-git-f39e821c7e3f0fda3bb5a266153e6a0fde944a97.tar.gz |
Merge branch 'PHP-7.4'
Diffstat (limited to 'ext/opcache/zend_persist.c')
-rw-r--r-- | ext/opcache/zend_persist.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index 1a22f12b4d..ed05872993 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -860,16 +860,20 @@ static void zend_persist_class_entry(zval *zv) int i; size_t size = sizeof(zend_property_info *) * ce->default_properties_count; + ZEND_ASSERT(ce->ce_flags & ZEND_ACC_LINKED); if (ZCG(is_immutable_class)) { - ce->properties_info_table = zend_shared_memdup_put( + ce->properties_info_table = zend_shared_memdup( ce->properties_info_table, size); } else { - ce->properties_info_table = zend_shared_memdup_arena_put( + ce->properties_info_table = zend_shared_memdup_arena( ce->properties_info_table, size); } for (i = 0; i < ce->default_properties_count; i++) { - ce->properties_info_table[i] = zend_shared_alloc_get_xlat_entry(ce->properties_info_table[i]); + if (ce->properties_info_table[i]) { + ce->properties_info_table[i] = zend_shared_alloc_get_xlat_entry( + ce->properties_info_table[i]); + } } } |