diff options
author | Simon Rettberg | 2023-09-28 15:28:06 +0200 |
---|---|---|
committer | Simon Rettberg | 2023-09-28 15:28:06 +0200 |
commit | 6aae1d1aba21231d4418ba1878158e985fe938d8 (patch) | |
tree | ad9597f97a502a451ebcf05e38f640a211c2261a /api.php | |
parent | [sysconfig] PHP Warning: Private methods cannot be final as they are never o... (diff) | |
download | slx-admin-6aae1d1aba21231d4418ba1878158e985fe938d8.tar.gz slx-admin-6aae1d1aba21231d4418ba1878158e985fe938d8.tar.xz slx-admin-6aae1d1aba21231d4418ba1878158e985fe938d8.zip |
Disable deprecated warnings when not in debug mode
Diffstat (limited to 'api.php')
-rw-r--r-- | api.php | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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); |