]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/formatter/BookmarkDefaultFormatter.php
Merge pull request #1512 from shaarli/dependabot/npm_and_yarn/elliptic-6.5.3
[github/shaarli/Shaarli.git] / application / formatter / BookmarkDefaultFormatter.php
index 08e710eb9e894e2dc36110474b9740b23531d1a2..9d4a0fa0235c591be9a29d7ad3714d15b97c1e49 100644 (file)
@@ -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'], '/') . '/';
             }