diff options
author | Andrew Dolgov <[email protected]> | 2006-08-13 05:46:40 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2006-08-13 05:46:40 +0100 |
commit | aec3ce39de92ab044cbfb4eaa7f98a564a010510 (patch) | |
tree | 80ab738ab14bd5ba0468c4b8037f6ff3e13ff1a8 /functions.php | |
parent | 746a0d5eb3488200c0b48e86dbc51a118bfae864 (diff) |
block mysql versions where true is undefined in sanity_check
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/functions.php b/functions.php index d1212499b..a46061bda 100644 --- a/functions.php +++ b/functions.php @@ -1217,6 +1217,8 @@ function sanity_check($link) { + error_reporting(0); + $error_code = 0; $result = db_query($link, "SELECT schema_version FROM ttrss_version"); $schema_version = db_fetch_result($result, 0, "schema_version"); @@ -1225,8 +1227,17 @@ $error_code = 5; } + if (DB_TYPE == "mysql") { + $result = db_query($link, "SELECT true", false); + if (db_num_rows($result) != 1) { + $error_code = 10; + } + } + + error_reporting (DEFAULT_ERROR_LEVEL); + if ($error_code != 0) { - print_error_xml(5); + print_error_xml($error_code); return false; } else { return true; |