From 74feef0f9d7258570a6c6a7a694fc1a0394843ca Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 18 Dec 2019 19:28:00 +0300 Subject: [PATCH 1/3] get_version: always return unsupported on windows --- include/functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index da87588f0..3b71eb0bd 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1897,7 +1897,9 @@ date_default_timezone_set('UTC'); $root_dir = dirname(dirname(__FILE__)); - if (file_exists("$root_dir/version_static.txt")) { + if ('\\' === DIRECTORY_SEPARATOR) { + $ttrss_version = "UNKNOWN (Unsupported, Windows)"; + } else if (file_exists("$root_dir/version_static.txt")) { $ttrss_version = trim(file_get_contents("$root_dir/version_static.txt")) . " (Unsupported)"; } else if (is_dir("$root_dir/.git")) { $rc = 0; From c309856a976b230a56b1eb700590111bd2ad7451 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 19 Dec 2019 07:04:01 +0300 Subject: [PATCH 2/3] get_version: filter out Darwin --- include/functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/functions.php b/include/functions.php index 3b71eb0bd..47dd9c73c 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1899,6 +1899,8 @@ if ('\\' === DIRECTORY_SEPARATOR) { $ttrss_version = "UNKNOWN (Unsupported, Windows)"; + } else if (PHP_OS === "Darwin") { + $ttrss_version = "UNKNOWN (Unsupported, Darwin)"; } else if (file_exists("$root_dir/version_static.txt")) { $ttrss_version = trim(file_get_contents("$root_dir/version_static.txt")) . " (Unsupported)"; } else if (is_dir("$root_dir/.git")) { From 6439f7817d779f43437b79dfb04e5254f7e0bbf4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 19 Dec 2019 08:37:19 +0300 Subject: [PATCH 3/3] force-disable php display_errors/display_startup_errors on startup --- include/functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/functions.php b/include/functions.php index 47dd9c73c..f244b47b8 100644 --- a/include/functions.php +++ b/include/functions.php @@ -27,6 +27,9 @@ error_reporting(E_ALL & ~E_NOTICE); } + ini_set('display_errors', 0); + ini_set('display_startup_errors', 0); + require_once 'config.php'; /**