File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ PHP NEWS
38
38
. Fixed bug GH-12936 (hash() function hangs endlessly if using sha512 on
39
39
strings >= 4GiB). (nielsdos)
40
40
41
+ - ODBC:
42
+ . Fix crash on Apache shutdown with persistent connections. (nielsdos)
43
+
41
44
- Opcache:
42
45
. Fixed oss-fuzz #64727 (JIT undefined array key warning may overwrite DIM
43
46
with NULL when DIM is the same var as result). (ilutov)
@@ -58,6 +61,8 @@ PHP NEWS
58
61
59
62
- PGSQL:
60
63
. Fixed auto_reset_persistent handling and allow_persistent type. (David Carlier)
64
+ . Fixed bug GH-12974 (Apache crashes on shutdown when using pg_pconnect()).
65
+ (nielsdos)
61
66
62
67
- PHPDBG:
63
68
. Fixed bug GH-12962 (Double free of init_file in phpdbg_prompt.c). (nielsdos)
Original file line number Diff line number Diff line change @@ -168,7 +168,13 @@ static void _close_odbc_conn(zend_resource *rsrc)
168
168
SQLFreeEnv (conn -> henv );
169
169
}
170
170
efree (conn );
171
- ODBCG (num_links )-- ;
171
+ /* See https://github.com/php/php-src/issues/12974 why we need to check the if */
172
+ #ifdef ZTS
173
+ if (odbc_module_entry .module_started )
174
+ #endif
175
+ {
176
+ ODBCG (num_links )-- ;
177
+ }
172
178
}
173
179
/* }}} */
174
180
Original file line number Diff line number Diff line change @@ -315,8 +315,14 @@ static void _close_pgsql_plink(zend_resource *rsrc)
315
315
PQclear (res );
316
316
}
317
317
PQfinish (link );
318
- PGG (num_persistent )-- ;
319
- PGG (num_links )-- ;
318
+ /* See https://github.com/php/php-src/issues/12974 why we need to check the if */
319
+ #ifdef ZTS
320
+ if (pgsql_module_entry .module_started )
321
+ #endif
322
+ {
323
+ PGG (num_persistent )-- ;
324
+ PGG (num_links )-- ;
325
+ }
320
326
rsrc -> ptr = NULL ;
321
327
}
322
328
You can’t perform that action at this time.
0 commit comments