We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7139c84 commit dcbb008Copy full SHA for dcbb008
ext/pgsql/pgsql.c
@@ -364,8 +364,10 @@ static int _rollback_transactions(zval *el)
364
365
link = (PGconn *) rsrc->ptr;
366
367
- /* unset notice processor */
368
- PQsetNoticeProcessor(link, _php_pgsql_notice_handler, NULL);
+ /* unset notice processor if we initially did set it */
+ if (PQsetNoticeProcessor(link, NULL, NULL) == _php_pgsql_notice_handler) {
369
+ PQsetNoticeProcessor(link, _php_pgsql_notice_handler, NULL);
370
+ }
371
372
if (PQsetnonblocking(link, 0)) {
373
php_error_docref("ref.pgsql", E_NOTICE, "Cannot set connection to blocking mode");
0 commit comments