Browse Source

fix phpdbg's -h switch

The help functionality needs a correct stdout fd, so pre setup it
for the only case.
pull/1545/merge
Anatol Belski 11 years ago
parent
commit
c82e21619e
  1. 4
      sapi/phpdbg/phpdbg.c

4
sapi/phpdbg/phpdbg.c

@ -1500,6 +1500,10 @@ phpdbg_main:
sapi_startup(phpdbg);
phpdbg->startup(phpdbg);
PHPDBG_G(flags) = 0;
/* It ain't gonna proceed to real execution anyway,
but the correct descriptor is needed already. */
PHPDBG_G(io)[PHPDBG_STDOUT].ptr = stdout;
PHPDBG_G(io)[PHPDBG_STDOUT].fd = fileno(stdout);
phpdbg_set_prompt(PHPDBG_DEFAULT_PROMPT);
phpdbg_do_help(NULL);
sapi_deactivate();

Loading…
Cancel
Save