We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5cd8777 commit 211e6d6Copy full SHA for 211e6d6
ext/pgsql/pgsql.c
@@ -187,6 +187,12 @@ static void pgsql_link_free(pgsql_link_handle *link)
187
188
zend_hash_del(&PGG(connections), link->hash);
189
190
+ if (link->persistent) {
191
+ /* Reset the notice processor context to NULL so that notices emitted
192
+ * during a subsequent PQreset on this persistent PGconn are safely
193
+ * ignored rather than written to a stale link handle. */
194
+ PQsetNoticeProcessor(link->conn, _php_pgsql_notice_handler, NULL);
195
+ }
196
link->conn = NULL;
197
zend_string_release(link->hash);
198
0 commit comments