From a383ff01e6a3a1b936f3bfdd2bd34c93ed2e36f7 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Tue, 2 Sep 2003 00:35:51 +0000 Subject: [PATCH] Error message clean up part III: Fix ini setting logic & respect docref_root --- main/main.c | 7 ++----- 1 file 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 [%s]: %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); -- 2.40.0