File tree 3 files changed +28
-1
lines changed
3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,8 @@ PHP NEWS
232
232
(Andrey)
233
233
- Fixed bug #44336 (Improve pcre UTF-8 string matching performance).
234
234
(frode at coretrek dot com, Nuno)
235
+ - Fixed bug #44301 (Segfault when an exception is thrown on persistent connections).
236
+ (Martin Jansen)
235
237
- Fixed bug #44257 (timelib_tz_lookup_table must use float for gmtoffset).
236
238
(Derick, iuri dot fiedoruk at hp dot com).
237
239
- Fixed bug #44214 (Crash using preg_replace_callback() and global variable).
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ static int oci_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
87
87
}
88
88
89
89
if (S -> einfo .errmsg ) {
90
- efree (S -> einfo .errmsg );
90
+ pefree (S -> einfo .errmsg , stmt -> dbh -> is_persistent );
91
91
S -> einfo .errmsg = NULL ;
92
92
}
93
93
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ PDO OCI Bug #44301 (Segfault when an exception is thrown on persistent connections)
3
+ --SKIPIF--
4
+ <?php
5
+ if (!extension_loaded ('pdo ' ) || !extension_loaded ('pdo_oci ' )) die ('skip not loaded ' );
6
+ require dirname (__FILE__ ).'/../../pdo/tests/pdo_test.inc ' ;
7
+ PDOTest::skip ();
8
+ ?>
9
+ --FILE--
10
+ <?php
11
+ putenv ("PDO_OCI_TEST_ATTR= " . serialize (array (PDO ::ATTR_PERSISTENT => true )));
12
+ require 'ext/pdo/tests/pdo_test.inc ' ;
13
+ $ db = PDOTest::test_factory ('ext/pdo_oci/tests/common.phpt ' );
14
+ $ db ->setAttribute (PDO ::ATTR_ERRMODE , PDO ::ERRMODE_EXCEPTION );
15
+
16
+ try {
17
+ $ stmt = $ db ->prepare ('SELECT * FROM no_table ' );
18
+ $ stmt ->execute ();
19
+ } catch (PDOException $ e ) {
20
+ print $ e ->getMessage ();
21
+ }
22
+ $ db = null ;
23
+ --EXPECTF --
24
+ SQLSTATE [HY000 ]: General error: 942 OCIStmtExecute: ORA -00 942 : table or view does not exist
25
+ (%s/ext/pdo_oci/oci_statement.c:%d)
You can’t perform that action at this time.
0 commit comments