summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-09-02 00:35:51 +0000
committerMarcus Boerger <helly@php.net>2003-09-02 00:35:51 +0000
commita383ff01e6a3a1b936f3bfdd2bd34c93ed2e36f7 (patch)
tree1909931cf9167f619faee28a42efd0d4a7ea9bf7
parent107a59ae72e6c4e7b9a61c782bf05e4fd8ced7a6 (diff)
downloadphp-git-a383ff01e6a3a1b936f3bfdd2bd34c93ed2e36f7.tar.gz
Error message clean up part III: Fix ini setting logic & respect docref_root
-rw-r--r--main/main.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/main/main.c b/main/main.c
index 0948db4aa1..10973b463d 100644
--- a/main/main.c
+++ b/main/main.c
@@ -487,7 +487,7 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c
}
}
}
- if (docref) {
+ if (docref && (PG(html_errors) || strlen(PG(docref_root)))) {
if (strncmp(docref, "http://", 7)) {
docref_root = PG(docref_root);
/* now check copy of extension */
@@ -515,10 +515,7 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c
}
}
}
- if (!PG(html_errors) || !strlen(PG(docref_root))) {
- /* no docref and no html errors -> do not point to any documentation (e.g. production boxes) */
- spprintf(&message, 0, "%s: %s", origin, buffer);
- } else if (PG(html_errors)) {
+ if (PG(html_errors)) {
spprintf(&message, 0, "%s [<a href='%s%s%s'>%s</a>]: %s", origin, docref_root, docref, docref_target, docref, buffer);
} else {
spprintf(&message, 0, "%s [%s%s%s]: %s", origin, docref_root, docref, docref_target, buffer);