From af4a9bf1bf9109714e0e45aaf907e9809abb6217 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 27 May 2020 18:26:32 +0200 Subject: Fix #73927: phpdbg fails with windows error prompt at "watch array" We expect zvals, so we should request zvals. We also suppress spurious watchpoint removal notices. --- sapi/phpdbg/phpdbg_watch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sapi/phpdbg/phpdbg_watch.c') diff --git a/sapi/phpdbg/phpdbg_watch.c b/sapi/phpdbg/phpdbg_watch.c index 317aa9666a..1dab755171 100644 --- a/sapi/phpdbg/phpdbg_watch.c +++ b/sapi/phpdbg/phpdbg_watch.c @@ -713,8 +713,9 @@ void phpdbg_automatic_dequeue_free(phpdbg_watch_element *element) { child = child->child; } PHPDBG_G(watchpoint_hit) = 1; - phpdbg_notice("watchdelete", "variable=\"%.*s\" recursive=\"%s\"", "%.*s has been removed, removing watchpoint%s", (int) ZSTR_LEN(child->str), ZSTR_VAL(child->str), (child->flags & PHPDBG_WATCH_RECURSIVE_ROOT) ? " recursively" : ""); - zend_hash_index_del(&PHPDBG_G(watch_elements), child->id); + if (zend_hash_index_del(&PHPDBG_G(watch_elements), child->id) == SUCCESS) { + phpdbg_notice("watchdelete", "variable=\"%.*s\" recursive=\"%s\"", "%.*s has been removed, removing watchpoint%s", (int) ZSTR_LEN(child->str), ZSTR_VAL(child->str), (child->flags & PHPDBG_WATCH_RECURSIVE_ROOT) ? " recursively" : ""); + } phpdbg_free_watch_element_tree(element); } -- cgit v1.2.1