From 1ec8049068469b0d2505cd594404e17ec6a20055 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Tue, 27 Feb 2024 10:31:56 +0700 Subject: [PATCH] fix path --- init.php | 6 +++--- system/controllers/customers.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/init.php b/init.php index 1d83c172..5c050497 100644 --- a/init.php +++ b/init.php @@ -76,10 +76,10 @@ if ($_app_stage != 'Live') { define('U', APP_URL . '/index.php?_route='); // notification message -if (file_exists($root_path . $UPLOAD_PATH . DIRECTORY_SEPARATOR . "notifications.json")) { - $_notifmsg = json_decode(file_get_contents($root_path . $UPLOAD_PATH . DIRECTORY_SEPARATOR . 'notifications.json'), true); +if (file_exists($UPLOAD_PATH . DIRECTORY_SEPARATOR . "notifications.json")) { + $_notifmsg = json_decode(file_get_contents($UPLOAD_PATH . DIRECTORY_SEPARATOR . 'notifications.json'), true); } -$_notifmsg_default = json_decode(file_get_contents($root_path . $UPLOAD_PATH . DIRECTORY_SEPARATOR . 'notifications.default.json'), true); +$_notifmsg_default = json_decode(file_get_contents($UPLOAD_PATH . DIRECTORY_SEPARATOR . 'notifications.default.json'), true); //register all plugin foreach (glob(File::pathFixer($PLUGIN_PATH . DIRECTORY_SEPARATOR . '*.php')) as $filename) { diff --git a/system/controllers/customers.php b/system/controllers/customers.php index 430dc8ef..90371224 100644 --- a/system/controllers/customers.php +++ b/system/controllers/customers.php @@ -274,7 +274,7 @@ switch ($action) { } catch (Throwable $e) { } try { - $c->delete(); + if($c) $c->delete(); } catch (Exception $e) { } catch (Throwable $e) { }