Fix the Error.Handling.inc method

This commit is contained in:
Clemens Schwaighofer
2018-04-24 10:23:34 +09:00
parent 5a6c7ec187
commit 7abdc96499
2 changed files with 9 additions and 2 deletions

View File

@@ -8,7 +8,13 @@
*********************************************************************/
// define the base working directory outside because in the function it might return undefined
DEFINE('CURRENT_WORKING_DIR', getcwd().'/');
// if we have config set BASE use this
if (defined('BASE')) {
DEFINE('CURRENT_WORKING_DIR', BASE);
} else {
// else we set. We fully assuem that Error.Handling is where it should be, in lib dir
DEFINE('CURRENT_WORKING_DIR', str_replace('lib', '', __DIR__));
}
// METHOD: MyErrorHandler
// PARAMS: $type: the error code from PHP