Merge branch 'PHP-8.3' into PHP-8.4
Some checks are pending
Push / MACOS_ARM64_DEBUG_NTS (push) Waiting to run
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
Push / FREEBSD (push) Has been skipped

This commit is contained in:
David Carlier 2025-08-15 08:05:14 +01:00
commit fd4db3e178
No known key found for this signature in database
GPG key ID: 8486F847B4B94EF1
2 changed files with 13 additions and 0 deletions

View file

@ -320,6 +320,10 @@ static void _close_pgsql_plink(zend_resource *rsrc)
static void _php_pgsql_notice_handler(void *l, const char *message)
{
if (l == NULL) {
/* This connection does not currently have a valid context, ignore this notice */
return;
}
if (PGG(ignore_notices)) {
return;
}
@ -352,6 +356,11 @@ static int _rollback_transactions(zval *el)
link = (PGconn *) rsrc->ptr;
/* unset notice processor if we initially did set it */
if (PQsetNoticeProcessor(link, NULL, NULL) == _php_pgsql_notice_handler) {
PQsetNoticeProcessor(link, _php_pgsql_notice_handler, NULL);
}
if (PQsetnonblocking(link, 0)) {
php_error_docref("ref.pgsql", E_NOTICE, "Cannot set connection to blocking mode");
return -1;