summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_list.c
diff options
context:
space:
mode:
authorMatteo Beccati <mbeccati@php.net>2019-04-03 14:36:11 +0200
committerMatteo Beccati <mbeccati@php.net>2019-04-03 14:36:11 +0200
commit9f02f9fd5c1c0c28b0adc5dd48d1b195dc16e7d8 (patch)
tree0302279e087616c2ad0e5d2c41823cb258dcae2a /sapi/phpdbg/phpdbg_list.c
parent0f811bb7b65854b3548e55f1a38ffd243a4d5e5d (diff)
parent4029c0b6a2908096b9dd49797260daafdae5558d (diff)
downloadphp-git-9f02f9fd5c1c0c28b0adc5dd48d1b195dc16e7d8.tar.gz
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Ref #76801 remove old file source from file_sources hash in case of file included more than once
Diffstat (limited to 'sapi/phpdbg/phpdbg_list.c')
-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));