From: Moriyoshi Koizumi Date: Tue, 12 Nov 2002 21:58:53 +0000 (+0000) Subject: Fixed a function overloading related bug. X-Git-Tag: php-4.3.0RC1~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3cf70024694774617726eb1ef0385e4ffcc144da;p=php Fixed a function overloading related bug. # Yet I suspect the problem is in another place... --- diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 4a4c6363a0..83d39eadc9 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -916,11 +916,12 @@ PHP_RINIT_FUNCTION(mbstring) if (zend_hash_find(EG(function_table), p->orig_func, strlen(p->orig_func)+1, (void **)&orig) != SUCCESS) { php_error_docref("ref.mbstring" TSRMLS_CC, E_ERROR, "mbstring couldn't find function %s.", p->orig_func); - } - zend_hash_add(EG(function_table), p->save_func, strlen(p->save_func)+1, orig, sizeof(zend_function), NULL); - if (zend_hash_update(EG(function_table), p->orig_func, strlen(p->orig_func)+1, + } else { + zend_hash_add(EG(function_table), p->save_func, strlen(p->save_func)+1, orig, sizeof(zend_function), NULL); + if (zend_hash_update(EG(function_table), p->orig_func, strlen(p->orig_func)+1, func, sizeof(zend_function), NULL) == FAILURE){ - php_error_docref("ref.mbstring" TSRMLS_CC, E_ERROR, "mbstring couldn't replace function %s.", p->orig_func); + php_error_docref("ref.mbstring" TSRMLS_CC, E_ERROR, "mbstring couldn't replace function %s.", p->orig_func); + } } } p++;