From e984a467ef8e327c2493fc442a731e8d55722fb5 Mon Sep 17 00:00:00 2001 From: slawkens1 Date: Sun, 8 Oct 2017 22:04:33 +0200 Subject: [PATCH] * print some info to error.log when can't find config.lua --- system/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/functions.php b/system/functions.php index a14666aa..e20af296 100644 --- a/system/functions.php +++ b/system/functions.php @@ -1144,7 +1144,10 @@ function load_config_lua($filename) $config_file = $filename; if(!@file_exists($config_file)) - die('ERROR: Cannot find ' . $filename . ' file.'); + { + log_append('error.log', '[load_config_file] Fatal error: Cannot load config.lua (' . $filename . '). Error: ' . print_r(error_get_last(), true)); + die('ERROR: Cannot find ' . $filename . ' file. More info in system/logs/error.log'); + } $result = array(); $config_string = file_get_contents($filename);