diff options
Diffstat (limited to 'sapi/phpdbg/phpdbg_watch.c')
| -rw-r--r-- | sapi/phpdbg/phpdbg_watch.c | 5 |
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); } |
