diff options
| author | Ferenc Kovacs <tyrael@php.net> | 2014-02-12 06:43:05 +0100 |
|---|---|---|
| committer | Ferenc Kovacs <tyrael@php.net> | 2014-02-12 06:43:05 +0100 |
| commit | 99bd2fd9c40b8766a73562297592a475a0b78023 (patch) | |
| tree | d465ccbc464c2768825700edc4d48b67dee09f9a /sapi/phpdbg/phpdbg_cmd.c | |
| parent | 1f148f7ad99e78476ff20ef47c09082ae2861bc4 (diff) | |
| parent | 06bbfe1e2a46d6c2eaf74b7c576b09114ee2e670 (diff) | |
| download | php-git-99bd2fd9c40b8766a73562297592a475a0b78023.tar.gz | |
Merge branch 'PHP-5.6' into PHP-5.6.0
* PHP-5.6: (97 commits)
update the alpha2 release date
Fixed ZTS and added fix to NEWS.
Implemented feature #45528: Allow the DateTimeZone constructor to accept timezones per offset too.
Rename timelib_get_zone to timelib_parse_zone and export.
fix regex to detect valgrind version New PCRE version got stricter
fix regex to detect valgrind version New PCRE version got stricter
Fixed memory leak in pow operator
5.5.9 now released
Added information in NEWS and UPGRADING
add T_POW (**) operator
add NEWS block for 5.6.0alpha3
updated libs_version.txt
updated libs_version.txt
update libs_version.txt
more tests for ICU >= 52.1 compat
fix tests for ICU >= 52.1
Fix year
adapt test to curl 7.35.0 upgrade
move the NEWS entry into the right section
Fixed SNI failure from missing Z_STRVAL_PP
...
Diffstat (limited to 'sapi/phpdbg/phpdbg_cmd.c')
| -rw-r--r-- | sapi/phpdbg/phpdbg_cmd.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c index c700851243..1d78c53321 100644 --- a/sapi/phpdbg/phpdbg_cmd.c +++ b/sapi/phpdbg/phpdbg_cmd.c @@ -479,7 +479,7 @@ disconnect: #ifndef HAVE_LIBREADLINE if (!(PHPDBG_G(flags) & PHPDBG_IS_REMOTE)) { - if (!phpdbg_write(phpdbg_get_prompt(TSRMLS_C))) { + if (!phpdbg_write("%s", phpdbg_get_prompt(TSRMLS_C))) { goto disconnect; } } @@ -595,6 +595,8 @@ PHPDBG_API int phpdbg_do_cmd(const phpdbg_command_t *command, phpdbg_input_t *in (command->alias == *input->argv[0]->string))) { phpdbg_param_t param; + phpdbg_command_t *initial_last_cmd; + phpdbg_param_t initial_last_param; param.type = EMPTY_PARAM; @@ -657,15 +659,20 @@ PHPDBG_API int phpdbg_do_cmd(const phpdbg_command_t *command, phpdbg_input_t *in } } + initial_last_param = PHPDBG_G(lparam); + initial_last_cmd = (phpdbg_command_t *)PHPDBG_G(lcmd); + PHPDBG_G(lparam) = param; + PHPDBG_G(lcmd) = (phpdbg_command_t *)command; + rc = command->handler(¶m, input TSRMLS_CC); /* only set last command when it is worth it! */ - if ((rc != FAILURE) && - !(PHPDBG_G(flags) & PHPDBG_IS_INITIALIZING)) { - PHPDBG_G(lcmd) = (phpdbg_command_t*) command; - phpdbg_clear_param( - &PHPDBG_G(lparam) TSRMLS_CC); - PHPDBG_G(lparam) = param; + if (rc != FAILURE && !(PHPDBG_G(flags) & PHPDBG_IS_INITIALIZING)) { + phpdbg_clear_param(&initial_last_param TSRMLS_CC); + } else if (PHPDBG_G(lcmd) == command && !memcmp(&PHPDBG_G(lparam),& initial_last_param, sizeof(phpdbg_param_t))) { + PHPDBG_G(lparam) = initial_last_param; + PHPDBG_G(lcmd) = initial_last_cmd; + phpdbg_clear_param(¶m TSRMLS_CC); } break; } |
