diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2002-11-12 21:58:53 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2002-11-12 21:58:53 +0000 |
commit | 3cf70024694774617726eb1ef0385e4ffcc144da (patch) | |
tree | 1e8305f36d6c58bac7dd58795d05d3ec4922cdf3 | |
parent | c65cbd24096d7b7d76dd97ec90ce02c2d78147e3 (diff) | |
download | php-git-3cf70024694774617726eb1ef0385e4ffcc144da.tar.gz |
Fixed a function overloading related bug.
# Yet I suspect the problem is in another place...
-rw-r--r-- | ext/mbstring/mbstring.c | 9 |
1 files changed, 5 insertions, 4 deletions
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++; |