From 624123177f8673f978c49186b43fd96c6827d8a0 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 28 Jul 2020 21:09:22 +0200 Subject: Include empty basePath in formatting --- application/formatter/BookmarkDefaultFormatter.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'application') diff --git a/application/formatter/BookmarkDefaultFormatter.php b/application/formatter/BookmarkDefaultFormatter.php index 08e710eb..9d4a0fa0 100644 --- a/application/formatter/BookmarkDefaultFormatter.php +++ b/application/formatter/BookmarkDefaultFormatter.php @@ -50,7 +50,7 @@ class BookmarkDefaultFormatter extends BookmarkFormatter */ public function formatUrl($bookmark) { - if ($bookmark->isNote() && !empty($this->contextData['index_url'])) { + if ($bookmark->isNote() && isset($this->contextData['index_url'])) { return rtrim($this->contextData['index_url'], '/') . '/' . escape(ltrim($bookmark->getUrl(), '/')); } @@ -63,11 +63,11 @@ class BookmarkDefaultFormatter extends BookmarkFormatter protected function formatRealUrl($bookmark) { if ($bookmark->isNote()) { - if (!empty($this->contextData['index_url'])) { + if (isset($this->contextData['index_url'])) { $prefix = rtrim($this->contextData['index_url'], '/') . '/'; } - if (!empty($this->contextData['base_path'])) { + if (isset($this->contextData['base_path'])) { $prefix = rtrim($this->contextData['base_path'], '/') . '/'; } -- cgit v1.2.3