I was playing with different scenarios of deploying tt-rss, so I needed to look at the sanity check a lot. I noticed it tries to use format_error() function, which is defined in include/controls.php, but it fails to require it. I propose the following patch to enable sanity_check to be called independently:
here’s the patch, but I could open a proper PR on gogs too. my id is the same gdamjan
diff --git a/include/sanity_check.php b/include/sanity_check.php
index 86dc7a5f0..e4ace0ee2 100755
--- a/include/sanity_check.php
+++ b/include/sanity_check.php
@@ -14,6 +14,7 @@
* If you come crying when stuff inevitably breaks, you will be mocked and told
* to get out. */
+ require_once "controls.php";
function make_self_url() {
$proto = is_server_https() ? 'https' : 'http';
ps. I haven’t come to it, but probably include/functions.php should be required too.
well that’s what I am investigating. it seems that the call to /backend.php returns a {"error":{"code":6,"message":null}} json, so it is as if somehow my session gets invalidated.
Anyway, I don’t understand the need to become all defensive, and to negate ones experience out of hand. I didn’t come here to take anything of you. At worst I can help.