Add mbstring polyfill for Plesk PHP without mbstring extension

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 12:34:48 +02:00
parent 68ee03ba21
commit 44de6ef76d

View File

@@ -18,6 +18,12 @@ set_exception_handler(function($e) {
define('ADMIN_PASSWORD', 'passus');
// ────────────────────────────────────────────────────────────────
// mbstring polyfill if extension is not loaded
if (!function_exists('mb_strlen')) {
function mb_strlen($s) { return strlen($s); }
function mb_strtolower($s) { return strtolower($s); }
}
define('DATA_DIR', __DIR__ . '/data/');
if (!is_dir(DATA_DIR)) mkdir(DATA_DIR, 0755, true);