Skip to content

Commit 3db3243

Browse files
committed
Merge branch 'PHP-8.2'
2 parents 9d9b8ba + 4c2db35 commit 3db3243

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

sapi/phpdbg/phpdbg_out.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ PHPDBG_API int phpdbg_vprint(int type, int fd, const char *strfmt, va_list args)
143143
return msglen;
144144
}
145145

146-
len = phpdbg_process_print(fd, type, msg, msglen);
146+
if (UNEXPECTED(msglen == 0)) {
147+
len = 0;
148+
} else {
149+
len = phpdbg_process_print(fd, type, msg, msglen);
150+
}
147151

148152
if (msg) {
149153
free(msg);

sapi/phpdbg/tests/gh10715.phpt

192 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)