summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Chitolina <alekitto@gmail.com>2019-04-02 14:36:59 +0200
committerMatteo Beccati <mbeccati@php.net>2019-04-03 14:35:57 +0200
commit4029c0b6a2908096b9dd49797260daafdae5558d (patch)
tree9664ac0024283cee7540e8cc010bee6ae86565a4
parent56a5d0bd9179972d0675f8f772fc5423d9de00d0 (diff)
downloadphp-git-4029c0b6a2908096b9dd49797260daafdae5558d.tar.gz
Ref #76801 remove old file source from file_sources hash in case of file included more than once
-rw-r--r--sapi/phpdbg/phpdbg_list.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c
index cb0250e9e0..15d1313e99 100644
--- a/sapi/phpdbg/phpdbg_list.c
+++ b/sapi/phpdbg/phpdbg_list.c
@@ -273,6 +273,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) {
dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint32_t) * line);
dataptr->line[line] = endptr - data.buf;
+ zend_hash_del(&PHPDBG_G(file_sources), ret->filename);
zend_hash_add_ptr(&PHPDBG_G(file_sources), ret->filename, dataptr);
phpdbg_resolve_pending_file_break(ZSTR_VAL(ret->filename));