summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2005-02-13 15:40:15 +0000
committerMarcus Boerger <helly@php.net>2005-02-13 15:40:15 +0000
commit746d5490cf0fd1379ab1a88d1d5655e7a516d256 (patch)
tree259f848d6f857b98bdad8caded1e147c3bef42a9
parentaedea8539c61d9fe0207679e1abfde68709eea74 (diff)
downloadphp-git-746d5490cf0fd1379ab1a88d1d5655e7a516d256.tar.gz
- Use runtimeException as base if present (synch with other dbs)
-rwxr-xr-xext/pdo/pdo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c
index 2a93a5f705..1d47f93865 100755
--- a/ext/pdo/pdo.c
+++ b/ext/pdo/pdo.c
@@ -33,6 +33,10 @@
#include "php_pdo_int.h"
#include "zend_exceptions.h"
+#ifdef HAVE_SPL
+extern PHPAPI zend_class_entry *spl_ce_RuntimeException;
+#endif
+
ZEND_DECLARE_MODULE_GLOBALS(pdo)
/* True global resources - no need for thread safety here */
@@ -282,7 +286,11 @@ PHP_MINIT_FUNCTION(pdo)
#endif
INIT_CLASS_ENTRY(ce, "PDOException", NULL);
+#ifdef HAVE_SPL
+ pdo_exception_ce = zend_register_internal_class_ex(&ce, spl_ce_RuntimeException, NULL TSRMLS_CC);
+#else
pdo_exception_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC);
+#endif
zend_declare_property_null(pdo_exception_ce, "errorInfo", sizeof("errorInfo")-1, ZEND_ACC_PUBLIC TSRMLS_CC);
INIT_CLASS_ENTRY(ce, "PDO", pdo_dbh_functions);