1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 01:02:25 +01:00

fixed bug #27421 (by david at dfoerster dot de) mbstring.func_overload set in .htaccess becomes global

This commit is contained in:
Rui Hirokawa
2008-06-13 14:47:48 +00:00
parent d88bbe3434
commit 19047cfd2e

View 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++;
}
}