[web-doc] fix/revcheck: Fix typo in error message and improve database file existence check

From: Date: Wed, 02 Sep 2026 03:15:50 +0000
Subject: [web-doc] fix/revcheck: Fix typo in error message and improve database file existence check
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-2553@lists.php.net to get a copy of this message
Author: Luffy (sy-records) Date: 2026-09-02T11:15:41+08:00 Commit: https://github.com/php/web-doc/commit/894254ced53f95a061cf2a39fe8be608c67d26f7 Raw diff: https://github.com/php/web-doc/commit/894254ced53f95a061cf2a39fe8be608c67d26f7.diff Fix typo in error message and improve database file existence check Changed paths: M www/error.php M www/revcheck.php Diff: diff --git a/www/error.php b/www/error.php index 4ab5d04..2ba95ee 100644 --- a/www/error.php +++ b/www/error.php @@ -9,7 +9,7 @@ echo '<p>File not found: '.htmlspecialchars($_SERVER['REQUEST_URI']).'</p>'; } else { - echo '<p>An error occured</p>'; + echo '<p>An error occurred</p>'; } site_footer(); diff --git a/www/revcheck.php b/www/revcheck.php index 7d30004..7166ec9 100644 --- a/www/revcheck.php +++ b/www/revcheck.php @@ -32,6 +32,12 @@ } $DBLANG = SQLITE_DIR . 'status.sqlite'; +if (!file_exists($DBLANG)) { + site_header(); + echo "<p>Database file doesn't exist</p>"; + site_footer(); + die; +} $dbhandle = new SQLite3($DBLANG); if (!$dbhandle) { @@ -46,6 +52,7 @@ if ($lang !== 'en' && is_null($lang_intro)) { site_header(); + header('HTTP/1.1 404 Not Found'); echo "<p>This revision check doesn't exist yet.</p>"; site_footer(); die;

« previous php.doc.web (#2553) next »