diff options
Diffstat (limited to 'sapi/phpdbg/phpdbg.c')
-rw-r--r-- | sapi/phpdbg/phpdbg.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index ee2483c1fb..f9777c5adb 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -1287,10 +1287,12 @@ php_stream *phpdbg_stream_url_wrap_php(php_stream_wrapper *wrapper, const char * if (!strncasecmp(path, "stdin", 6) && PHPDBG_G(stdin_file)) { php_stream *stream = php_stream_fopen_from_fd(dup(fileno(PHPDBG_G(stdin_file))), "r", NULL); #ifdef PHP_WIN32 - zval *blocking_pipes = php_stream_context_get_option(context, "pipe", "blocking"); - if (blocking_pipes) { - convert_to_long(blocking_pipes); - php_stream_set_option(stream, PHP_STREAM_OPTION_PIPE_BLOCKING, Z_LVAL_P(blocking_pipes), NULL); + if (context != NULL) { + zval *blocking_pipes = php_stream_context_get_option(context, "pipe", "blocking"); + if (blocking_pipes) { + convert_to_long(blocking_pipes); + php_stream_set_option(stream, PHP_STREAM_OPTION_PIPE_BLOCKING, Z_LVAL_P(blocking_pipes), NULL); + } } #endif return stream; @@ -2005,6 +2007,8 @@ phpdbg_out: phpdbg_out: #endif + phpdbg_purge_watchpoint_tree(); + if (first_command) { free(first_command); first_command = NULL; |