]> granicus.if.org Git - php/commitdiff
Fix shutdown
authorMarcus Boerger <helly@php.net>
Thu, 15 Jan 2004 21:30:31 +0000 (21:30 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 15 Jan 2004 21:30:31 +0000 (21:30 +0000)
ext/sqlite/sqlite.c

index 74ed212f8c0dbe06646f3feca407e3b62c2edd73..ee429ac0ce6f8e8caf93ca96f0d5ac9757a607b2 100644 (file)
@@ -367,13 +367,13 @@ static int php_sqlite_forget_persistent_id_numbers(zend_rsrc_list_entry *rsrc TS
 {
        struct php_sqlite_db *db = (struct php_sqlite_db*)rsrc->ptr;
 
-       /* prevent bad mojo if someone tries to use a previously registered function in the next request */
-       zend_hash_apply(&db->callbacks, (apply_func_t)php_sqlite_callback_invalidator TSRMLS_CC);
-
        if (Z_TYPE_P(rsrc) != le_sqlite_pdb) {
                return 0;
        }
 
+       /* prevent bad mojo if someone tries to use a previously registered function in the next request */
+       zend_hash_apply(&db->callbacks, (apply_func_t)php_sqlite_callback_invalidator TSRMLS_CC);
+
        db->rsrc_id = FAILURE;
 
        /* don't leave pending commits hanging around */