diff --git a/index.php b/index.php index 0bda5e7f..069aeaf8 100644 --- a/index.php +++ b/index.php @@ -2,6 +2,7 @@ # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details +require_once __DIR__ . '/lib/bootstrap.php'; // We need to set this to return a 200 since we use .htaccess ErrorDocument // rules to handle archives. diff --git a/lib/bootstrap.php b/lib/bootstrap.php new file mode 100644 index 00000000..e795dcab --- /dev/null +++ b/lib/bootstrap.php @@ -0,0 +1,11 @@ +pushHandler(new \Whoops\Handler\PrettyPageHandler()); +$whoops->register(); diff --git a/serendipity_admin.php b/serendipity_admin.php index 8987bd90..ca218ac1 100644 --- a/serendipity_admin.php +++ b/serendipity_admin.php @@ -2,6 +2,8 @@ # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details +require_once __DIR__ . '/lib/bootstrap.php'; + define('IN_installer', true); define('IN_upgrader', true); define('IN_serendipity', true); diff --git a/serendipity_config.inc.php b/serendipity_config.inc.php index ce3c01fd..c958c0a8 100644 --- a/serendipity_config.inc.php +++ b/serendipity_config.inc.php @@ -241,16 +241,6 @@ if (function_exists('get_include_path')) { $old_include = @ini_get('include_path'); } - -require_once("vendor/autoload.php"); - - -if ($serendipity['production'] !== true) { - $whoops = new \Whoops\Run; - $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler); - $whoops->register(); -} - $new_include = ($serendipity['use_PEAR'] ? $old_include . PATH_SEPARATOR : '') . S9Y_INCLUDE_PATH . 'bundled-libs/' . PATH_SEPARATOR . $serendipity['serendipityPath'] . PATH_SEPARATOR