From faf87202031358b51b46017c31d66af190ee9114 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 19 Sep 2020 14:36:11 -0400 Subject: [PATCH] Check for the existence of a .mo file before opening. --- includes/class_mo.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/class_mo.php b/includes/class_mo.php index 1a8a3b0..df4cddd 100644 --- a/includes/class_mo.php +++ b/includes/class_mo.php @@ -110,7 +110,14 @@ class MOReader { global $bugsys; - $this->file = @fopen($this->filename, 'r'); + + if (!file_exists($this->file)) + { + $bugsys->debug("could find MO file {$this->filename}"); + return; + } + + $this->file = fopen($this->filename, 'r'); if (!$this->file) { $bugsys->debug("could not open MO file {$this->filename}"); -- 2.43.5