]> granicus.if.org Git - php/commitdiff
stop break on condition from bugging out
authorkrakjoe <joe.watkins@live.co.uk>
Wed, 20 Nov 2013 20:29:14 +0000 (20:29 +0000)
committerkrakjoe <joe.watkins@live.co.uk>
Wed, 20 Nov 2013 20:29:14 +0000 (20:29 +0000)
phpdbg_break.c
phpdbg_cmd.c
test.php

index 21500436346d2bcf8455ae06b6cb1f1266473a95..b0345a0a614b649f066cea7ea9b2eb37f1c36872 100644 (file)
@@ -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);
index a440655cb57e70ee89f2990b14fd9de543703817..f26fbbc04c07b841a1386a6bd3a6fb846245181a 100644 (file)
@@ -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];
 
index 89e7b1177f9103ae98a5b9cd353db9f096491d33..a2c4b48623cf8fddb835215c51b01d2633f4b0e7 100644 (file)
--- a/test.php
+++ b/test.php
@@ -26,7 +26,6 @@ function test() {
 
 $dbg = new phpdbg();
 
-
 var_dump(
     $dbg->isGreat("PHP Rocks !!"));