mirror of
https://github.com/php/php-src.git
synced 2025-08-17 22:48:57 +02:00
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Update NEWS Fixed bug #76754 (parent private constant in extends class memory leak)
This commit is contained in:
commit
3131ebcea8
2 changed files with 19 additions and 1 deletions
18
Zend/tests/bug76754.phpt
Normal file
18
Zend/tests/bug76754.phpt
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
--TEST--
|
||||||
|
Bug #76754 (parent private constant in extends class memory leak)
|
||||||
|
--INI--
|
||||||
|
opcache.enable=0
|
||||||
|
opcache.enable_cli=0
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
|
||||||
|
class FOO
|
||||||
|
{
|
||||||
|
private const FOO = 'BAR';
|
||||||
|
}
|
||||||
|
|
||||||
|
class BAR extends FOO { }
|
||||||
|
?>
|
||||||
|
okey
|
||||||
|
--EXPECT--
|
||||||
|
okey
|
|
@ -256,8 +256,8 @@ ZEND_API void destroy_zend_class(zval *zv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ZEND_HASH_FOREACH_END();
|
} ZEND_HASH_FOREACH_END();
|
||||||
zend_hash_destroy(&ce->constants_table);
|
|
||||||
}
|
}
|
||||||
|
zend_hash_destroy(&ce->constants_table);
|
||||||
if (ce->num_interfaces > 0 && ce->interfaces) {
|
if (ce->num_interfaces > 0 && ce->interfaces) {
|
||||||
efree(ce->interfaces);
|
efree(ce->interfaces);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue