Fix empty needle after trimming at PageInfo
authorPhilipp <admin@philipp.info>
Fri, 23 Apr 2021 19:12:00 +0000 (21:12 +0200)
committerPhilipp <admin@philipp.info>
Fri, 23 Apr 2021 19:12:00 +0000 (21:12 +0200)
src/Content/PageInfo.php

index e61db38..3fc5330 100644 (file)
@@ -292,7 +292,8 @@ class PageInfo
                        }
 
                        // Stripping link labels that include a shortened version of the URL
-                       if (strpos($url, trim($match[1], '.…')) !== false) {
+                       $trimMatch = trim($match[1], '.…');
+                       if (!empty($trimMatch) && strpos($url, $trimMatch) !== false) {
                                return '';
                        }