From 5e299c84adffda0ace5c5ca6d391b2b5d46d1ac6 Mon Sep 17 00:00:00 2001 From: danpros Date: Sun, 2 Nov 2025 11:55:29 +0700 Subject: [PATCH] Update dispatch.php --- system/includes/dispatch.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/system/includes/dispatch.php b/system/includes/dispatch.php index 539e365..2aaf8af 100644 --- a/system/includes/dispatch.php +++ b/system/includes/dispatch.php @@ -164,9 +164,11 @@ function save_theme_config($data = array(), $new = array(), $theme = null) if (!is_dir($dir)) { mkdir($dir, 0775, true); } + $string = ''; $config_file = $dir . $theme . '.ini'; - - $string = file_get_contents($config_file) . "\n"; + if (file_exists($config_file)) { + $string = file_get_contents($config_file) . "\n"; + } foreach ($data as $word => $value) { $value = json_encode($value, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);