summaryrefslogtreecommitdiff
path: root/include/sanity_check.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-12-01 15:03:14 +0300
committerAndrew Dolgov <[email protected]>2017-12-01 15:03:14 +0300
commitbbd9e5045ed4276d47bd55124f81b35440849c1d (patch)
tree1c6fe2693ecda573f2497d74abfdf49247c45a4f /include/sanity_check.php
parent4ff8bdcb0021cd009fcaca9573c6c0e2976baed3 (diff)
controls: start pdo stuff
Diffstat (limited to 'include/sanity_check.php')
-rwxr-xr-xinclude/sanity_check.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/sanity_check.php b/include/sanity_check.php
index a84959f8e..713777585 100755
--- a/include/sanity_check.php
+++ b/include/sanity_check.php
@@ -91,9 +91,11 @@
}
if (SINGLE_USER_MODE) {
- $result = db_query("SELECT id FROM ttrss_users WHERE id = 1");
+ $pdo = DB::pdo();
- if (db_num_rows($result) != 1) {
+ $res = $pdo->query("SELECT id FROM ttrss_users WHERE id = 1");
+
+ if (!$res->fetch()) {
array_push($errors, "SINGLE_USER_MODE is enabled in config.php but default admin account is not found.");
}
}