protected function _load_nails_config() { // Load up nails.json and set NAILS_DATA $_nails_data = @file_get_contents(NAILS_PATH . 'nails.json'); if (empty($_nails_data)) { _NAILS_ERROR('Could not load nails.json.'); } $_nails_data = json_decode($_nails_data); if (empty($_nails_data)) { _NAILS_ERROR('Could not parse nails.json.'); } $this->_nails_data = $_nails_data; }
function show_fatal_error($subject = '', $message = '') { if (isset(get_instance()->fatal_error_handler) && is_callable(array(get_instance()->fatal_error_handler, 'send_developer_mail'))) { if ($subject && $message) { get_instance()->fatal_error_handler->send_developer_mail($subject, $message); } get_instance()->fatal_error_handler->show($subject, $message); } elseif (function_exists('_NAILS_ERROR')) { _NAILS_ERROR($message, $subject); } else { echo '<h1>ERROR: ' . $subject . '</h1>'; echo '<h2>' . $message . '</h2>'; exit(0); } }