@@ -54,7 +54,12 @@ int php_pdo_list_entry(void)
54
54
/* for exceptional circumstances */
55
55
zend_class_entry * pdo_exception_ce ;
56
56
57
- PDO_API zend_class_entry * php_pdo_get_exception (TSRMLS_D )
57
+ PDO_API zend_class_entry * php_pdo_get_dbh_ce (void )
58
+ {
59
+ return pdo_dbh_ce ;
60
+ }
61
+
62
+ PDO_API zend_class_entry * php_pdo_get_exception (void )
58
63
{
59
64
return pdo_exception_ce ;
60
65
}
@@ -68,7 +73,7 @@ PDO_API char *php_pdo_str_tolower_dup(const char *src, int len)
68
73
69
74
PDO_API zend_class_entry * php_pdo_get_exception_base (int root TSRMLS_DC )
70
75
{
71
- #if can_handle_soft_dependency_on_SPL && defined(HAVE_SPL )
76
+ #if can_handle_soft_dependency_on_SPL && defined(HAVE_SPL ) && (( PHP_MAJOR_VERSION > 5 ) || ( PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1 ))
72
77
if (!root ) {
73
78
if (!spl_ce_RuntimeException ) {
74
79
zend_class_entry * * pce ;
@@ -82,7 +87,7 @@ PDO_API zend_class_entry *php_pdo_get_exception_base(int root TSRMLS_DC)
82
87
}
83
88
}
84
89
#endif
85
- #if (PHP_MAJOR_VERSION < 6 )
90
+ #if (PHP_MAJOR_VERSION == 5 ) && ( PHP_MINOR_VERSION < 2 )
86
91
return zend_exception_get_default ();
87
92
#else
88
93
return zend_exception_get_default (TSRMLS_C );
@@ -151,7 +156,7 @@ zend_module_entry pdo_module_entry = {
151
156
/* }}} */
152
157
153
158
/* TODO: visit persistent handles: for each persistent statement handle,
154
- * remove bound parameter associations in RSHUTDOWN */
159
+ * remove bound parameter associations */
155
160
156
161
#ifdef COMPILE_DL_PDO
157
162
ZEND_GET_MODULE (pdo )
@@ -368,6 +373,8 @@ PHP_MINFO_FUNCTION(pdo)
368
373
369
374
if (drivers ) {
370
375
efree (drivers );
376
+ } else {
377
+ efree (ldrivers );
371
378
}
372
379
373
380
php_info_print_table_end ();
0 commit comments