From d2f21677d59b843a471d3b08d6d30a743235c284 Mon Sep 17 00:00:00 2001 From: Rui Hirokawa Date: Fri, 13 Jun 2008 14:49:19 +0000 Subject: [PATCH] MFH --- ext/mbstring/mbstring.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index f60ae28bd7..f4ce67fa46 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -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++; } } -- 2.50.1