1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

#5120 Fix for legacy e107_config.php format.

This commit is contained in:
camer0n 2023-12-19 15:43:19 -08:00
parent cab361e76c
commit 356a7c2e7f

View File

@ -24,11 +24,19 @@
const e107_INIT = true; const e107_INIT = true;
function thumbExceptionHandler(Throwable $exception) function thumbExceptionHandler(Throwable $e)
{ {
http_response_code(500); http_response_code(500);
echo "Fatal Thumbnail Error\n"; echo "Fatal Thumbnail Error\n";
error_log($exception->getMessage());
$message = sprintf(
"Exception: %s, File: %s, Line: %d, Trace: %s",
$e->getMessage(),
$e->getFile(),
$e->getLine(),
$e->getTraceAsString()
);
error_log($message);
} }
function thumbErrorHandler($errno, $errstr, $errfile, $errline) function thumbErrorHandler($errno, $errstr, $errfile, $errline)
@ -125,6 +133,7 @@ class e_thumbpage
} }
} }
$legacy_sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix');
$sql_info = array_combine(array_map(function($k) { $sql_info = array_combine(array_map(function($k) {
return str_replace('mySQL', '', $k); return str_replace('mySQL', '', $k);
}, array_keys($legacy_sql_info)), }, array_keys($legacy_sql_info)),