summaryrefslogtreecommitdiff
path: root/main/streams/xp_socket.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-11-30 15:06:40 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-11-30 15:06:40 +0100
commit39c59e084c8f5fc9b0ce379fbf62dbdf547e400b (patch)
tree76c28f69d342cfaeabcd45c329ba7ded7c2048aa /main/streams/xp_socket.c
parenta3d0752a0a44c3e51656cdba4bad8035175312f0 (diff)
parent24a19cc232668b5b839932a120d663b903729777 (diff)
downloadphp-git-39c59e084c8f5fc9b0ce379fbf62dbdf547e400b.tar.gz
Merge branch 'PHP-8.0'
* PHP-8.0: Suppress stream errors in mysqlnd
Diffstat (limited to 'main/streams/xp_socket.c')
-rw-r--r--main/streams/xp_socket.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c
index cd67fcb8ca..34dc4f2037 100644
--- a/main/streams/xp_socket.c
+++ b/main/streams/xp_socket.c
@@ -104,10 +104,13 @@ retry:
}
}
- estr = php_socket_strerror(err, NULL, 0);
- php_error_docref(NULL, E_NOTICE, "Send of " ZEND_LONG_FMT " bytes failed with errno=%d %s",
+ if (!(stream->flags & PHP_STREAM_FLAG_SUPPRESS_ERRORS)) {
+ estr = php_socket_strerror(err, NULL, 0);
+ php_error_docref(NULL, E_NOTICE,
+ "Send of " ZEND_LONG_FMT " bytes failed with errno=%d %s",
(zend_long)count, err, estr);
- efree(estr);
+ efree(estr);
+ }
}
if (didwrite > 0) {