Fix Cron for

This commit is contained in:
Ibnu Maksum
2024-01-15 10:22:03 +07:00
parent f38da8d3c0
commit 5867a0c9ca
5 changed files with 40 additions and 17 deletions

View File

@ -118,7 +118,7 @@ try {
$ui->assign("error_title", "PHPNuxBill Crash");
if (isset($_SESSION['uid'])) {
$ui->assign("error_message", $e->getMessage() . '<br>');
}else{
} else {
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
}
$ui->display('router-error.tpl');
@ -130,13 +130,13 @@ function _notify($msg, $type = 'e')
$_SESSION['ntype'] = $type;
$_SESSION['notify'] = $msg;
}
if(empty($config['language'])){
if (empty($config['language'])) {
$config['language'] = 'english';
}
$lan_file = File::pathFixer('system/lan/' . $config['language'] . '/common.lan.php');
if(file_exists($lan_file)){
if (file_exists($lan_file)) {
require $lan_file;
}else{
} else {
die("$lan_file not found");
}
@ -190,7 +190,11 @@ $_notifmsg_default = json_decode(file_get_contents(File::pathFixer('system/uploa
//register all plugin
foreach (glob(File::pathFixer("system/plugin/*.php")) as $filename) {
include $filename;
try {
include $filename;
} catch (Throwable $e) {
} catch (Exception $e) {
}
}
@ -293,7 +297,8 @@ function time_elapsed_string($datetime, $full = false)
}
}
if (!$full) $string = array_slice($string, 0, 1);
if (!$full)
$string = array_slice($string, 0, 1);
return $string ? implode(', ', $string) . ' ago' : 'just now';
}
@ -340,7 +345,7 @@ try {
}
} catch (Exception $e) {
if (!isset($_SESSION['aid']) || empty($_SESSION['aid'])) {
r2(U . 'home' , 'e', $e->getMessage());
r2(U . 'home', 'e', $e->getMessage());
}
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
$ui->assign("error_title", "PHPNuxBill Crash");