]> granicus.if.org Git - php/commitdiff
MFH
authorRui Hirokawa <hirokawa@php.net>
Fri, 13 Jun 2008 14:48:33 +0000 (14:48 +0000)
committerRui Hirokawa <hirokawa@php.net>
Fri, 13 Jun 2008 14:48:33 +0000 (14:48 +0000)
ext/mbstring/mbstring.c

index 4ded5962a5492aeca7cb875d21d8d546a1f8906d..7e223cafba0cd403073eee0bddbe43e9bdc69e42 100644 (file)
@@ -1025,9 +1025,14 @@ PHP_RSHUTDOWN_FUNCTION(mbstring)
        /*  clear overloaded function. */
        if (MBSTRG(func_overload)){
                p = &(mb_ovld[0]);
-               while (p->type > 0 && zend_hash_find(EG(function_table), p->save_func, strlen(p->save_func)+1 , (void **)&orig) == SUCCESS) {
-                       zend_hash_update(EG(function_table), p->orig_func, strlen(p->orig_func)+1, orig, sizeof(zend_function), NULL);
-                       zend_hash_del(EG(function_table), p->save_func, strlen(p->save_func)+1);
+               while (p->type > 0) {
+                       if ((MBSTRG(func_overload) & p->type) == p->type && 
+                               zend_hash_find(EG(function_table), p->save_func,
+                                                          strlen(p->save_func)+1, (void **)&orig) == SUCCESS) {
+                               
+                               zend_hash_update(EG(function_table), p->orig_func, strlen(p->orig_func)+1, orig, sizeof(zend_function), NULL);
+                               zend_hash_del(EG(function_table), p->save_func, strlen(p->save_func)+1);
+                       }
                        p++;
                }
        }