summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_list.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg_list.c')
-rw-r--r--sapi/phpdbg/phpdbg_list.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c
index 03b4c3526e..0967e22f65 100644
--- a/sapi/phpdbg/phpdbg_list.c
+++ b/sapi/phpdbg/phpdbg_list.c
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
@@ -244,7 +242,6 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) {
if (zend_stream_fixup(file, &bufptr, &len) == FAILURE) {
if (type == ZEND_REQUIRE) {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, file->filename);
- zend_bailout();
} else {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file->filename);
}
@@ -319,7 +316,7 @@ zend_op_array *phpdbg_init_compile_file(zend_file_handle *file, int type) {
return op_array;
}
-zend_op_array *phpdbg_compile_string(zval *source_string, char *filename) {
+zend_op_array *phpdbg_compile_string(zend_string *source_string, const char *filename) {
zend_string *fake_name;
zend_op_array *op_array;
phpdbg_file_source *dataptr;
@@ -330,9 +327,9 @@ zend_op_array *phpdbg_compile_string(zval *source_string, char *filename) {
return PHPDBG_G(compile_string)(source_string, filename);
}
- dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint32_t) * Z_STRLEN_P(source_string));
- dataptr->buf = estrndup(Z_STRVAL_P(source_string), Z_STRLEN_P(source_string));
- dataptr->len = Z_STRLEN_P(source_string);
+ dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint32_t) * ZSTR_LEN(source_string));
+ dataptr->buf = estrndup(ZSTR_VAL(source_string), ZSTR_LEN(source_string));
+ dataptr->len = ZSTR_LEN(source_string);
dataptr->line[0] = 0;
for (line = 0, bufptr = dataptr->buf - 1, endptr = dataptr->buf + dataptr->len; ++bufptr < endptr;) {
if (*bufptr == '\n') {