Skip to content

Commit 4029c0b

Browse files
alekittombeccati
authored andcommitted
Ref #76801 remove old file source from file_sources hash in case of file included more than once
1 parent 56a5d0b commit 4029c0b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sapi/phpdbg/phpdbg_list.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) {
273273
dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint32_t) * line);
274274
dataptr->line[line] = endptr - data.buf;
275275

276+
zend_hash_del(&PHPDBG_G(file_sources), ret->filename);
276277
zend_hash_add_ptr(&PHPDBG_G(file_sources), ret->filename, dataptr);
277278
phpdbg_resolve_pending_file_break(ZSTR_VAL(ret->filename));
278279

0 commit comments

Comments
 (0)