From: krakjoe Date: Wed, 20 Nov 2013 14:40:08 +0000 (+0000) Subject: fix broken sub command error X-Git-Tag: php-5.6.0alpha1~110^2~174 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ab45b4ccecda8237cf056dfc16a6e8260a0f669;p=php fix broken sub command error --- diff --git a/phpdbg_cmd.c b/phpdbg_cmd.c index 90d8c1e579..f14004fd62 100644 --- a/phpdbg_cmd.c +++ b/phpdbg_cmd.c @@ -329,15 +329,18 @@ int phpdbg_do_cmd(const phpdbg_command_t *command, const phpdbg_input_t *input T phpdbg_debug( "trying sub commands in \"%s\" for \"%s\" with %d arguments", command->name, sub.argv[0]->string, sub.argc-1); - return phpdbg_do_cmd(command->subs, &sub TSRMLS_CC); - } else { - phpdbg_parse_param( - input->argv[1]->string, - input->argv[1]->length, - ¶m TSRMLS_CC); + if (phpdbg_do_cmd(command->subs, &sub TSRMLS_CC) == SUCCESS) { + return SUCCESS; + } } + + /* pass parameter on */ + phpdbg_parse_param( + input->argv[1]->string, + input->argv[1]->length, + ¶m TSRMLS_CC); } - + phpdbg_debug( "found command %s for %s with %d arguments", command->name, input->argv[0]->string, input->argc-1); @@ -367,7 +370,8 @@ int phpdbg_do_cmd(const phpdbg_command_t *command, const phpdbg_input_t *input T phpdbg_error( "No function executed !!"); } - + +out: return rc; } /* }}} */