From a8470bb0a3f2ac36bf52020fab13bfe054fa315e Mon Sep 17 00:00:00 2001 From: GeekQu Date: Tue, 15 Oct 2019 12:44:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=BA=E5=A4=B1=E7=9A=84?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controllers/LinkController.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/Controllers/LinkController.php b/app/Controllers/LinkController.php index 2f618281..4367dbda 100644 --- a/app/Controllers/LinkController.php +++ b/app/Controllers/LinkController.php @@ -376,11 +376,15 @@ class LinkController extends BaseController } $SourceContent = @file_get_contents($SourceURL); if ($SourceContent) { + $Content = ConfController::YAML2Array($SourceContent); + if (!is_array($Content)) { + return $Content; + } return ConfController::getSurgeConfs( $user, $All_Proxy, $items, - ConfController::YAML2Array($SourceContent) + $Content ); } else { return '远程配置下载失败。'; @@ -693,10 +697,14 @@ class LinkController extends BaseController } $SourceContent = @file_get_contents($SourceURL); if ($SourceContent) { + $Content = ConfController::YAML2Array($SourceContent); + if (!is_array($Content)) { + return $Content; + } return ConfController::getClashConfs( $user, $Proxys, - ConfController::YAML2Array($SourceContent) + $Content ); } else { return '远程配置下载失败。';