Skip to content

Commit c359ca8

Browse files
committed
Fixed printing
1 parent b795ce6 commit c359ca8

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

sapi/phpdbg/phpdbg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,11 @@ static PHP_FUNCTION(phpdbg_exec)
292292
ZVAL_TRUE(return_value);
293293
}
294294
} else {
295-
zend_error(E_WARNING, "Failed to set execution context (%s), not a regular file or symlink", exec);
295+
zend_error(E_WARNING, "Failed to set execution context (%s), not a regular file or symlink", ZSTR_VAL(exec));
296296
ZVAL_FALSE(return_value);
297297
}
298298
} else {
299-
zend_error(E_WARNING, "Failed to set execution context (%s) the file does not exist", exec);
299+
zend_error(E_WARNING, "Failed to set execution context (%s) the file does not exist", ZSTR_VAL(exec));
300300

301301
ZVAL_FALSE(return_value);
302302
}

sapi/phpdbg/phpdbg_info.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ PHPDBG_INFO(files) /* {{{ */
7272

7373
phpdbg_try_access {
7474
ZEND_HASH_FOREACH_STR_KEY(&EG(included_files), fname) {
75-
phpdbg_writeln("includedfile", "name=\"%s\"", "File: %s", fname);
75+
phpdbg_writeln("includedfile", "name=\"%s\"", "File: %s", ZSTR_VAL(fname));
7676
} ZEND_HASH_FOREACH_END();
7777
} phpdbg_catch_access {
7878
phpdbg_error("signalsegv", "", "Could not fetch file name, invalid data source, aborting included file listing");
@@ -274,7 +274,7 @@ static int phpdbg_print_symbols(zend_bool show_globals) {
274274

275275
#undef VARIABLEINFO
276276
} phpdbg_catch_access {
277-
phpdbg_writeln("variable", "address=\"%p\" name=\"%s\"", "%p\tn/a\tn/a\t$%s", data, var);
277+
phpdbg_writeln("variable", "address=\"%p\" name=\"%s\"", "%p\tn/a\tn/a\t$%s", data, ZSTR_VAL(var));
278278
} phpdbg_end_try_access();
279279
} ZEND_HASH_FOREACH_END();
280280
}

sapi/phpdbg/phpdbg_list.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ PHPDBG_LIST(class) /* {{{ */
111111
if (ce->info.user.filename) {
112112
phpdbg_list_file(ce->info.user.filename, ce->info.user.line_end - ce->info.user.line_start + 1, ce->info.user.line_start, 0);
113113
} else {
114-
phpdbg_error("list", "type=\"nosource\" class=\"%s\"", "The source of the requested class (%s) cannot be found", ce->name);
114+
phpdbg_error("list", "type=\"nosource\" class=\"%s\"", "The source of the requested class (%s) cannot be found", ZSTR_VAL(ce->name));
115115
}
116116
} else {
117-
phpdbg_error("list", "type=\"internalclass\" class=\"%s\"", "The class requested (%s) is not user defined", ce->name);
117+
phpdbg_error("list", "type=\"internalclass\" class=\"%s\"", "The class requested (%s) is not user defined", ZSTR_VAL(ce->name));
118118
}
119119
} else {
120120
phpdbg_error("list", "type=\"notfound\" class=\"%s\"", "The requested class (%s) could not be found", param->str);
@@ -152,7 +152,7 @@ void phpdbg_list_file(zend_string *filename, uint count, int offset, uint highli
152152
lastline = data->lines;
153153
}
154154

155-
phpdbg_xml("<list %r file=\"%s\">", filename);
155+
phpdbg_xml("<list %r file=\"%s\">", ZSTR_VAL(filename));
156156

157157
for (line = offset; line < lastline;) {
158158
uint linestart = data->line[line++];

sapi/phpdbg/phpdbg_prompt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1629,7 +1629,7 @@ void phpdbg_force_interruption(void) /* {{{ */ {
16291629
if (data) {
16301630
if (data->func) {
16311631
if (ZEND_USER_CODE(data->func->type)) {
1632-
phpdbg_notice("hardinterrupt", "opline=\"%p\" num=\"%lu\" file=\"%s\" line=\"%u\"", "Current opline: %p (op #%lu) in %s:%u", data->opline, (data->opline - data->func->op_array.opcodes) / sizeof(data->opline), data->func->op_array.filename, data->opline->lineno);
1632+
phpdbg_notice("hardinterrupt", "opline=\"%p\" num=\"%lu\" file=\"%s\" line=\"%u\"", "Current opline: %p (op #%lu) in %s:%u", data->opline, (data->opline - data->func->op_array.opcodes) / sizeof(data->opline), data->func->op_array.filename->val, data->opline->lineno);
16331633
} else if (data->func->internal_function.function_name) {
16341634
phpdbg_notice("hardinterrupt", "func=\"%s\"", "Current opline: in internal function %s", data->func->internal_function.function_name->val);
16351635
} else {

0 commit comments

Comments
 (0)