summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_watch.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-06-02 15:19:32 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-06-02 15:19:32 +0200
commit486b8b1cd193fb5bb12d4810b18e076bb1f3933b (patch)
tree9bc050fe28432f3764006239a8ae060ffc3610f9 /sapi/phpdbg/phpdbg_watch.c
parentf733047ae2af425f0b83c7e7ac3f19166947cac5 (diff)
parentaf4a9bf1bf9109714e0e45aaf907e9809abb6217 (diff)
downloadphp-git-486b8b1cd193fb5bb12d4810b18e076bb1f3933b.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Fix #73927: phpdbg fails with windows error prompt at "watch array"
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 784ab3a999..c0920e0e4f 100644
--- a/sapi/phpdbg/phpdbg_watch.c
+++ b/sapi/phpdbg/phpdbg_watch.c
@@ -711,8 +711,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);
}