Exemple #1
0
                eval($code);
            }
        }
    }
}
spl_autoload_register('autoload');
/* INIT */
// --- clockwork
Singleton::getInstance('Clockwork')->init();
// --- error handling
if (!Config::getSetting('debug')) {
    error_reporting(0);
    ini_set('display_errors', false);
}
// --- sanitize
if (Clockwork::isLibraryLoaded('sanitize') && Config::getSetting('sanitize_request')) {
    $_REQUEST = array();
    $_GET = sanitize($_GET);
    $_POST = sanitize($_POST);
}
// --- CSRF
if (Clockwork::isModuleLoaded('CSRF') && $_POST) {
    try {
        CSRF::check($_POST['CSRF-key']);
    } catch (Exception $e) {
        unset($_POST);
        $_POST = [];
    }
}
// --- locale
if (Config::getSetting('locale', false)) {