summaryrefslogtreecommitdiffstats
path: root/api.php
diff options
context:
space:
mode:
Diffstat (limited to 'api.php')
-rw-r--r--api.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/api.php b/api.php
index a40a0a1c..4c58687b 100644
--- a/api.php
+++ b/api.php
@@ -1,9 +1,13 @@
<?php
-error_reporting(E_ALL);
chdir(dirname($_SERVER['SCRIPT_FILENAME']));
require_once 'config.php';
+if (CONFIG_DEBUG) {
+ error_reporting(E_ALL);
+} else {
+ error_reporting(E_ALL & ~E_DEPRECATED);
+}
define('API', true);
define('AJAX', false);