From: Wez Furlong Date: Fri, 10 Jun 2005 06:11:29 +0000 (+0000) Subject: "Fix" PECL #4411 X-Git-Tag: php-5.0.1b1~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fcff6a079a7badbf05055ce3425b8981db244385;p=php "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. --- 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);