From 75e2e7ddf5524e74215c6add92a076b622e3ccb9 Mon Sep 17 00:00:00 2001 From: krakjoe Date: Wed, 20 Nov 2013 20:29:14 +0000 Subject: [PATCH] stop break on condition from bugging out --- phpdbg_break.c | 6 ++++++ phpdbg_cmd.c | 2 +- test.php | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/phpdbg_break.c b/phpdbg_break.c index 2150043634..b0345a0a61 100644 --- a/phpdbg_break.c +++ b/phpdbg_break.c @@ -67,6 +67,12 @@ PHPDBG_BREAK(address) /* {{{ */ PHPDBG_BREAK(on) /* {{{ */ { + if (input && input->argc > 2) { + phpdbg_error( + "Unquoted complex expression detected, please \"quote\" complex expressions"); + return SUCCESS; + } + switch (param->type) { case STR_PARAM: phpdbg_set_breakpoint_expression(param->str, param->len TSRMLS_CC); diff --git a/phpdbg_cmd.c b/phpdbg_cmd.c index a440655cb5..f26fbbc04c 100644 --- a/phpdbg_cmd.c +++ b/phpdbg_cmd.c @@ -322,7 +322,7 @@ int phpdbg_do_cmd(const phpdbg_command_t *command, const phpdbg_input_t *input T if (input->argc > 1) { if (command->subs) { phpdbg_input_t sub; - + sub.argc = input->argc-1; sub.argv = &input->argv[1]; diff --git a/test.php b/test.php index 89e7b1177f..a2c4b48623 100644 --- a/test.php +++ b/test.php @@ -26,7 +26,6 @@ function test() { $dbg = new phpdbg(); - var_dump( $dbg->isGreat("PHP Rocks !!")); -- 2.50.1