]> granicus.if.org Git - php/commitdiff
Bugfix #25329
authorMarcus Boerger <helly@php.net>
Sat, 27 Dec 2003 22:11:48 +0000 (22:11 +0000)
committerMarcus Boerger <helly@php.net>
Sat, 27 Dec 2003 22:11:48 +0000 (22:11 +0000)
ext/sqlite/sqlite.c

index 29a3bc1a2154fe47262cc2684a00305bf7a13d4f..214d2e4cfb69daa89e1cb48687a2c2296b3ce505 100644 (file)
@@ -375,6 +375,9 @@ static int php_sqlite_forget_persistent_id_numbers(zend_rsrc_list_entry *rsrc TS
 {
        struct php_sqlite_db *db;
 
+       /* 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;
        }
@@ -386,9 +389,6 @@ static int php_sqlite_forget_persistent_id_numbers(zend_rsrc_list_entry *rsrc TS
        /* don't leave pending commits hanging around */
        sqlite_exec(db->db, "ROLLBACK", NULL, NULL, NULL);
        
-       /* 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);
-       
        return 0;
 }