From fcff6a079a7badbf05055ce3425b8981db244385 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Fri, 10 Jun 2005 06:11:29 +0000 Subject: [PATCH] "Fix" PECL #4411 SPL is not initialized before PDO, so inheriting from SPL's runtime exception class gives PDO a broken exception class. We don't currently have a way to express this kind of "soft" dependency in the build system, so I'm disabling inheriting from the runtime exception for now. --- ext/pdo/pdo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c index fc3216c9b6..ddbc8478b7 100755 --- a/ext/pdo/pdo.c +++ b/ext/pdo/pdo.c @@ -352,7 +352,7 @@ PHP_MINIT_FUNCTION(pdo) #endif INIT_CLASS_ENTRY(ce, "PDOException", NULL); -#if defined(HAVE_SPL) && ((PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1)) +#if can_handle_soft_dependency_on_SPL && defined(HAVE_SPL) && ((PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1)) 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); -- 2.50.1