]> granicus.if.org Git - php/commitdiff
Always only halt upon first non-recv opcode in a function
authorBob Weinand <bobwei9@hotmail.com>
Sun, 19 Jul 2015 18:32:46 +0000 (20:32 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Mon, 20 Jul 2015 16:00:42 +0000 (18:00 +0200)
sapi/phpdbg/phpdbg_bp.c

index 06c1e40b6f99b3439b5857d574e86942bf70116d..99f2d0990c35e06f083ff86328b4536dc45b2d8b 100644 (file)
@@ -1080,8 +1080,9 @@ PHPDBG_API phpdbg_breakbase_t *phpdbg_find_breakpoint(zend_execute_data *execute
        }
 
        if (PHPDBG_G(flags) & (PHPDBG_HAS_METHOD_BP|PHPDBG_HAS_SYM_BP)) {
-               /* check we are at the beginning of the stack */
-               if (execute_data->opline == execute_data->func->op_array.opcodes) {
+               zend_op_array *op_array = &execute_data->func->op_array;
+               /* check we are at the beginning of the stack, but after argument RECV */
+               if (execute_data->opline == op_array->opcodes + op_array->num_args + !!(op_array->fn_flags & ZEND_ACC_VARIADIC)) {
                        if ((base = phpdbg_find_breakpoint_symbol(execute_data->func))) {
                                goto result;
                        }