Skip to content

Commit 4a77a1e

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: Fix error checking in mysqlnd
2 parents fad4ea1 + 7a4b213 commit 4a77a1e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/mysqlnd/mysqlnd_protocol_frame_codec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ MYSQLND_METHOD(mysqlnd_pfc, send)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const v
202202
if (bytes_sent <= 0) {
203203
DBG_ERR_FMT("Can't %zu send bytes", count);
204204
SET_CLIENT_ERROR(error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
205+
bytes_sent = 0; // the return type is unsigned and 0 represents an error condition
205206
}
206207
DBG_RETURN(bytes_sent);
207208
}

0 commit comments

Comments
 (0)