We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cb2dff commit a6f5b19Copy full SHA for a6f5b19
src/Detectors/Languages.php
@@ -17,7 +17,7 @@ public function detect(): array
17
$language = $node->getAttribute('hreflang');
18
$href = $node->getAttribute('href');
19
20
- if (!$language || !$href) {
+ if (isEmpty()) {
21
continue;
22
}
23
@@ -26,4 +26,13 @@ public function detect(): array
26
27
return $languages;
28
29
+
30
+ private function isEmpty($value): boolval
31
+ {
32
+ $skipValues = array(
33
+ 'undefined',
34
+ );
35
36
+ return empty($value) || in_array($value, $skipValues);
37
+ }
38
0 commit comments