From d5ab0e1b44f845b4a85c93669c09051a90900476 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Fri, 17 Nov 2023 14:38:20 +0700 Subject: [PATCH] Fix Error for Customer --- system/boot.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/system/boot.php b/system/boot.php index 586fdcd6..6284fbc9 100644 --- a/system/boot.php +++ b/system/boot.php @@ -116,7 +116,11 @@ try { $ui->setConfigDir(File::pathFixer('ui/conf/')); $ui->setCacheDir(File::pathFixer('ui/cache/')); $ui->assign("error_title", "PHPNuxBill Crash"); - $ui->assign("error_message", $e->getMessage() . '
' . $e->getTraceAsString() . '
'); + if (isset($_SESSION['uid'])) { + $ui->assign("error_message", $e->getMessage() . '
'); + }else{ + $ui->assign("error_message", $e->getMessage() . '
' . $e->getTraceAsString() . '
'); + } $ui->display('router-error.tpl'); die(); } @@ -341,8 +345,11 @@ try { r2(U . 'dashboard', 'e', 'not found'); } } catch (Exception $e) { - $ui->assign("error_title", "PHPNuxBill Crash"); + if (isset($_SESSION['uid'])) { + r2(U , 'e', $e->getMessage()); + } $ui->assign("error_message", $e->getMessage() . '
' . $e->getTraceAsString() . '
'); + $ui->assign("error_title", "PHPNuxBill Crash"); $ui->display('router-error.tpl'); die(); }