fix: Stop irc bot crashing on .reload #4353

* Removed duplicate include

* Move set_debug into functions.php, and restore the (re)loading of includes/defaults

* Move debug call until after function has been included
This commit is contained in:
David Bell
2016-09-07 18:42:49 +01:00
committed by Neil Lathwood
parent 50a02a0fc5
commit f00c383d60
8 changed files with 22 additions and 17 deletions

View File

@@ -37,6 +37,17 @@ include_once($config['install_dir'] . "/includes/services.inc.php");
$console_color = new Console_Color2();
function set_debug($debug)
{
if (isset($debug)) {
ini_set('display_errors', 1);
ini_set('display_startup_errors', 0);
ini_set('log_errors', 0);
ini_set('allow_url_fopen', 0);
ini_set('error_reporting', E_ALL);
}
}//end set_debug()
function array_sort($array, $on, $order = SORT_ASC)
{
$new_array = array();