summaryrefslogtreecommitdiff
path: root/ext/pdo/pdo.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-08-11 17:24:03 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-08-11 17:40:39 +0200
commit898bb97706326311a367aaef35b3f95510100f3c (patch)
tree78c0fdf15ea14e0b13e7ad7612a2683c5ac3cdba /ext/pdo/pdo.c
parent33028bf014270f94c9407725d9117fa9a5ecec02 (diff)
downloadphp-git-898bb97706326311a367aaef35b3f95510100f3c.tar.gz
Drop php_pdo_get_exception_base() function
This API is more confusing than helpful.
Diffstat (limited to 'ext/pdo/pdo.c')
-rw-r--r--ext/pdo/pdo.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c
index 9b97ba1416..a66596ee54 100644
--- a/ext/pdo/pdo.c
+++ b/ext/pdo/pdo.c
@@ -70,15 +70,6 @@ PDO_API char *php_pdo_str_tolower_dup(const char *src, int len) /* {{{ */
}
/* }}} */
-PDO_API zend_class_entry *php_pdo_get_exception_base(int root) /* {{{ */
-{
- if (!root) {
- return spl_ce_RuntimeException;
- }
- return zend_ce_exception;
-}
-/* }}} */
-
/* {{{ Return array of available PDO drivers */
PHP_FUNCTION(pdo_drivers)
{
@@ -315,7 +306,7 @@ PHP_MINIT_FUNCTION(pdo)
INIT_CLASS_ENTRY(ce, "PDOException", NULL);
- pdo_exception_ce = zend_register_internal_class_ex(&ce, php_pdo_get_exception_base(0));
+ pdo_exception_ce = zend_register_internal_class_ex(&ce, spl_ce_RuntimeException);
zend_declare_property_null(pdo_exception_ce, "errorInfo", sizeof("errorInfo")-1, ZEND_ACC_PUBLIC);