From 821aff2e9c41b26cfb0ac75816f822f831184201 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Wed, 12 Apr 2006 12:52:00 +0000 Subject: [PATCH] MF51: fix #37053 (html_errors with internal classes produces wrong links) --- main/main.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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 = '-'; -- 2.50.1