]> granicus.if.org Git - php/commitdiff
MF51: fix #37053 (html_errors with internal classes produces wrong links)
authorAntony Dovgal <tony2001@php.net>
Wed, 12 Apr 2006 12:52:00 +0000 (12:52 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 12 Apr 2006 12:52:00 +0000 (12:52 +0000)
main/main.c

index 50fc98325313200a161b014782e2dc9a6c98a74c..710f984b7017c4723935834c40dbefe99fea4b6c 100644 (file)
@@ -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 = '-';