com php-src: stop break on condition from bugging out: phpdbg_break.c phpdbg_cmd.c test.php
| From: | Bob Weinand | Date: | Wed, 20 Nov 2013 20:29:14 +0000 |
| Subject: | com php-src: stop break on condition from bugging out: phpdbg_break.c phpdbg_cmd.c test.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74736@lists.php.net to get a copy of this message | ||
Commit: 75e2e7ddf5524e74215c6add92a076b622e3ccb9
Author: krakjoe <joe.watkins@live.co.uk> Wed, 20 Nov 2013 20:29:14 +0000
Parents: 3c36fb99f2b2391bf05a1b5e9c33acf37986a0ef
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=75e2e7ddf5524e74215c6add92a076b622e3ccb9
Log:
stop break on condition from bugging out
Changed paths:
M phpdbg_break.c
M phpdbg_cmd.c
M test.php
Diff:
diff --git a/phpdbg_break.c b/phpdbg_break.c
index 2150043..b0345a0 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 a440655..f26fbbc 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 89e7b11..a2c4b48 100644
--- a/test.php
+++ b/test.php
@@ -26,7 +26,6 @@ function test() {
$dbg = new phpdbg();
-
var_dump(
$dbg->isGreat("PHP Rocks !!"));