]> granicus.if.org Git - php/commitdiff
fixed bug #27421 (by david at dfoerster dot de) mbstring.func_overload set in .htacce...
authorRui Hirokawa <hirokawa@php.net>
Fri, 13 Jun 2008 14:47:48 +0000 (14:47 +0000)
committerRui Hirokawa <hirokawa@php.net>
Fri, 13 Jun 2008 14:47:48 +0000 (14:47 +0000)
ext/mbstring/mbstring.c

index d62f1df5e0abd03352f6d510797c45807c60350e..b0c493e8cb800ac11efe339d8675f4780252292e 100644 (file)
@@ -1029,9 +1029,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++;
                }
        }