From: Antony Dovgal Date: Wed, 12 Apr 2006 12:52:00 +0000 (+0000) Subject: MF51: fix #37053 (html_errors with internal classes produces wrong links) X-Git-Tag: RELEASE_1_3~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=821aff2e9c41b26cfb0ac75816f822f831184201;p=php MF51: fix #37053 (html_errors with internal classes produces wrong links) --- diff --git a/main/main.c b/main/main.c index 50fc983253..710f984b70 100644 --- a/main/main.c +++ b/main/main.c @@ -608,10 +608,18 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c /* no docref given but function is known (the default) */ if (!docref && function.v) { - if (function_name_is_string) { - spprintf(&docref_buf, 0, "function.%s", function.s); + if (space[0] == '\0') { + if (function_name_is_string) { + spprintf(&docref_buf, 0, "function.%s", function.s); + } else { + spprintf(&docref_buf, 0, "function.%v", function); + } } else { - spprintf(&docref_buf, 0, "function.%v", function); + if (function_name_is_string) { + spprintf(&docref_buf, 0, "function.%v-%s", class_name, function.s); + } else { + spprintf(&docref_buf, 0, "function.%v-%v", class_name, function); + } } while((p = strchr(docref_buf, '_')) != NULL) { *p = '-';