summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_prompt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index 13026978bf..acdae17ce3 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -566,7 +566,8 @@ int phpdbg_compile(void) /* {{{ */
return FAILURE;
}
- if (php_stream_open_for_zend_ex(PHPDBG_G(exec), &fh, USE_PATH|STREAM_OPEN_FOR_INCLUDE) == SUCCESS && zend_stream_fixup(&fh, &buf, &len) == SUCCESS) {
+ zend_stream_init_filename(&fh, PHPDBG_G(exec));
+ if (php_stream_open_for_zend_ex(&fh, USE_PATH|STREAM_OPEN_FOR_INCLUDE) == SUCCESS && zend_stream_fixup(&fh, &buf, &len) == SUCCESS) {
CG(skip_shebang) = 1;
PHPDBG_G(ops) = zend_compile_file(&fh, ZEND_INCLUDE);
zend_destroy_file_handle(&fh);
@@ -581,7 +582,7 @@ int phpdbg_compile(void) /* {{{ */
} else {
phpdbg_error("compile", "type=\"openfailure\" context=\"%s\"", "Could not open file %s", PHPDBG_G(exec));
}
-
+ zend_destroy_file_handle(&fh);
return FAILURE;
} /* }}} */