http://cvsweb.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.276&r2=1.277 --- ext/mbstring/mbstring.c 2006-05-11 16:47:34.000000000 +0200 +++ ext/mbstring/mbstring.c.oden 2009-03-05 10:29:05.000000000 +0100 @@ -1017,9 +1017,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++; } }