From 69e9a051c1c3c1560b596c465536edabd0a983b8 Mon Sep 17 00:00:00 2001 From: pushuo Date: Mon, 10 Jul 2023 09:56:15 +0000 Subject: [PATCH] =?UTF-8?q?!149=20Fix=20configuration=20link=20status=20di?= =?UTF-8?q?sabled=20and=20display=20problems=20*=20wip=20*=20wip=20*=20Fix?= =?UTF-8?q?=20configuration=20link=20status=20disabled=20and=20display=20p?= =?UTF-8?q?roblems=20->=20https:/=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- beike/Libraries/Url.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/beike/Libraries/Url.php b/beike/Libraries/Url.php index 9922eb6e..bd5ab0a0 100644 --- a/beike/Libraries/Url.php +++ b/beike/Libraries/Url.php @@ -65,7 +65,8 @@ class Url return $value->url ?? ''; } elseif ($type == 'page') { if (! $value instanceof \Beike\Models\Page) { - $value = \Beike\Models\Page::query()->find($value); + $page = \Beike\Models\Page::query()->find($value); + $value = $page->active ? $page : null; } return $value->url ?? '';