Author: Mark Randall
Committer: Derick Rethans (derickr)
Date: 2026-06-18T13:15:38+01:00

Commit: 
https://github.com/php/web-php/commit/ebac5b79935e9306bfc6e178cb8ac430d03d3ffb
Raw diff: 
https://github.com/php/web-php/commit/ebac5b79935e9306bfc6e178cb8ac430d03d3ffb.diff

Fix: Updated includes in error.ph

Changed paths:
  M  public/error.php


Diff:

diff --git a/public/error.php b/public/error.php
index 3de9e88d80..19c096dbbd 100644
--- a/public/error.php
+++ b/public/error.php
@@ -115,7 +115,7 @@
 // send them to the /releases page since that is likely to be most helpful.
 if (preg_match("!^distributions/.*!", $URI, $array)) {
     status_header(404);
-    require_once __DIR__ . "/releases/index.php";
+    require_once ProjectGlobals::getPublicRoot() . "/releases/index.php";
 }
 
 // ============================================================================
@@ -142,7 +142,7 @@
 
     $df = $dlinfo[1];
     if (strpos($df, "7-LATEST") !== false) {
-        require_once __DIR__ . "/include/version.inc";
+        require_once __DIR__ . "/../include/version.inc";
         [$latest] = release_get_latest();
         $df = str_replace("7-LATEST", $latest, $df);
     }
@@ -740,7 +740,7 @@
 
 // ============================================================================
 // Try to find the page using the preferred language as a manual page
-require_once __DIR__ . "/include/manual-lookup.inc";
+require_once ProjectGlobals::getProjectRoot() . "/include/manual-lookup.inc";
 $try = find_manual_page($LANG, $URI);
 if ($try) {
     status_header(200);

Reply via email to