moriyoshi Tue Nov 12 16:58:54 2002 EDT Modified files: /php4/ext/mbstring mbstring.c Log: Fixed a function overloading related bug. # Yet I suspect the problem is in another place... Index: php4/ext/mbstring/mbstring.c diff -u php4/ext/mbstring/mbstring.c:1.137 php4/ext/mbstring/mbstring.c:1.138 --- php4/ext/mbstring/mbstring.c:1.137 Tue Nov 12 14:24:45 2002 +++ php4/ext/mbstring/mbstring.c Tue Nov 12 16:58:53 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mbstring.c,v 1.137 2002/11/12 19:24:45 moriyoshi Exp $ */ +/* $Id: mbstring.c,v 1.138 2002/11/12 21:58:53 moriyoshi Exp $ */ /* * PHP4 Multibyte String module "mbstring" (currently only for Japanese) @@ -916,11 +916,12 @@ 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++;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php