summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_watch.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-05-27 18:26:32 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-06-02 15:17:40 +0200
commitaf4a9bf1bf9109714e0e45aaf907e9809abb6217 (patch)
treea5eda3272e96ffc8fab505d3e12d0d1fa681863b /sapi/phpdbg/phpdbg_watch.c
parent461135009c9c5e5a5839f22aff23ee7c896fb730 (diff)
downloadphp-git-af4a9bf1bf9109714e0e45aaf907e9809abb6217.tar.gz
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.
Diffstat (limited to 'sapi/phpdbg/phpdbg_watch.c')
-rw-r--r--sapi/phpdbg/phpdbg_watch.c5
1 files changed, 3 insertions, 2 deletions
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);
}