diff options
author | Andrew Dolgov <[email protected]> | 2021-02-23 22:26:07 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-23 22:26:07 +0300 |
commit | 8d2e3c2528e67f8650c122f014364a34bf690d2a (patch) | |
tree | fd44203c8a5919848f689cb6caa8c0c8d0784d54 /include/functions.php | |
parent | 37d46411c77bda2b1823f7d230b06e36b7125a8d (diff) |
drop errors.php and simplify error handling
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/include/functions.php b/include/functions.php index a698fa79d..d916301fb 100644 --- a/include/functions.php +++ b/include/functions.php @@ -323,20 +323,6 @@ } } - function sanity_check() { - require_once 'errors.php'; - $ERRORS = get_error_types(); - - $error_code = 0; - $schema_version = get_schema_version(true); - - if ($schema_version != SCHEMA_VERSION) { - $error_code = 5; - } - - return array("code" => $error_code, "message" => $ERRORS[$error_code]); - } - function file_is_locked($filename) { if (file_exists(Config::get(Config::LOCK_DIRECTORY) . "/$filename")) { if (function_exists('flock')) { @@ -533,20 +519,6 @@ return file_exists("themes/$theme") || file_exists("themes.local/$theme"); } - /** - * @SuppressWarnings(unused) - */ - function error_json($code) { - require_once "errors.php"; - $ERRORS = get_error_types(); - - @$message = $ERRORS[$code]; - - return json_encode(array("error" => - array("code" => $code, "message" => $message))); - - } - function arr_qmarks($arr) { return str_repeat('?,', count($arr) - 1) . '?'; } |