diff --git a/public/index.php b/public/index.php index d7c71c9..9f72eab 100644 --- a/public/index.php +++ b/public/index.php @@ -1,28 +1,5 @@ = 5.3, it is recommended to disable - * deprecated notices. Disable with: E_ALL & ~E_DEPRECATED + * In a production environment, it is safe to ignore notices and warnings. + * Disable them by using: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED */ -error_reporting(E_ALL | E_STRICT); +error_reporting(E_ALL); /** * End of standard configuration! Changing any of the code below should only be @@ -53,27 +27,12 @@ * @link https://kohana.top/guide/using.configuration */ // Set the full path to the docroot -define('DOCROOT', realpath(__DIR__ . '/..') . DIRECTORY_SEPARATOR); - -// Make the application relative to the docroot, for symlink'd index.php -if (!is_dir($application) AND is_dir(DOCROOT . $application)) - $application = DOCROOT . $application; - -// Make the modules relative to the docroot, for symlink'd index.php -if (!is_dir($modules) AND is_dir(DOCROOT . $modules)) - $modules = DOCROOT . $modules; - -// Make the system relative to the docroot, for symlink'd index.php -if (!is_dir($system) AND is_dir(DOCROOT . $system)) - $system = DOCROOT . $system; - -// Define the absolute paths for configured directories -define('APPPATH', realpath($application) . DIRECTORY_SEPARATOR); -define('MODPATH', realpath($modules) . DIRECTORY_SEPARATOR); -define('SYSPATH', realpath($system) . DIRECTORY_SEPARATOR); +define('DOCROOT', __DIR__ . DIRECTORY_SEPARATOR); -// Clean up the configuration vars -unset($application, $modules, $system); +// Define the absolute paths for required directories +define('APPPATH', realpath(DOCROOT . '../application') . DIRECTORY_SEPARATOR); +define('MODPATH', realpath(DOCROOT . '../modules') . DIRECTORY_SEPARATOR); +define('SYSPATH', realpath(DOCROOT . '../system') . DIRECTORY_SEPARATOR); if (file_exists('install' . EXT)) { // Load the installation check @@ -97,7 +56,7 @@ // Bootstrap the application require APPPATH . 'bootstrap' . EXT; -if (PHP_SAPI == 'cli') { +if (PHP_SAPI === 'cli') { // Try and load minion class_exists('Minion_Task') OR die('Please enable the Minion module for CLI support.'); set_exception_handler(['Minion_Exception', 'handler']);