mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-02-08 18:08:13 -05:00
[fix] 修复catch的时候变量可能undefined的问题
This commit is contained in:
parent
0389edd4d0
commit
bab7ed8e97
@ -26,9 +26,10 @@ class BackupDatabase extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 数据库备份逻辑
|
// 数据库备份逻辑
|
||||||
|
$databaseBackupPath = storage_path('backup/' . now()->format('Y-m-d_H-i-s') . '_' . config('database.connections.mysql.database') . '_database_backup.sql');
|
||||||
|
$compressedBackupPath = $databaseBackupPath . '.gz';
|
||||||
try{
|
try{
|
||||||
if (config('database.default') === 'mysql'){
|
if (config('database.default') === 'mysql'){
|
||||||
$databaseBackupPath = storage_path('backup/' . now()->format('Y-m-d_H-i-s') . '_' . config('database.connections.mysql.database') . '_database_backup.sql');
|
|
||||||
$this->info("1️⃣:开始备份Mysql");
|
$this->info("1️⃣:开始备份Mysql");
|
||||||
\Spatie\DbDumper\Databases\MySql::create()
|
\Spatie\DbDumper\Databases\MySql::create()
|
||||||
->setHost(config('database.connections.mysql.host'))
|
->setHost(config('database.connections.mysql.host'))
|
||||||
|
@ -48,7 +48,7 @@ class StripeALLInOne {
|
|||||||
$currency = $this->config['currency'];
|
$currency = $this->config['currency'];
|
||||||
$exchange = $this->exchange('CNY', strtoupper($currency));
|
$exchange = $this->exchange('CNY', strtoupper($currency));
|
||||||
if (!$exchange) {
|
if (!$exchange) {
|
||||||
throw new ApiException(__('Currency conversion has timed out, please try again later'));
|
throw new ApiException('Currency conversion has timed out, please try again later', 500);
|
||||||
}
|
}
|
||||||
$stripe = new \Stripe\StripeClient($this->config['stripe_sk_live']);
|
$stripe = new \Stripe\StripeClient($this->config['stripe_sk_live']);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user