]> granicus.if.org Git - php/commitdiff
"Fix" PECL #4411
authorWez Furlong <wez@php.net>
Fri, 10 Jun 2005 06:11:29 +0000 (06:11 +0000)
committerWez Furlong <wez@php.net>
Fri, 10 Jun 2005 06:11:29 +0000 (06:11 +0000)
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

index fc3216c9b6d2c7697fe6beeb2bce5777781c5a23..ddbc8478b7260875e3a7b99034d105b4c2623d3e 100755 (executable)
@@ -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);