We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 607a941 commit e94cef8Copy full SHA for e94cef8
1 file changed
src/SitemapParser.php
@@ -290,11 +290,12 @@ public function parseRobotstxt( string $robotstxt ): \Iterator {
290
(array) preg_split( '/:/', $line, 2 )
291
);
292
// Check if the line contains a sitemap
293
- if (
294
- strtolower( $pair[0] ) !== self::XML_TAG_SITEMAP ||
295
- empty( $pair[1] )
296
- ) {
297
- // Line does not contain any supported directive
+ if ( strtolower( $pair[0] ) !== self::XML_TAG_SITEMAP ) {
+ // Directive is not supported
+ continue;
+ }
+ if ( empty( $pair[1] ) ) {
298
+ // Line does not contain any directive
299
continue;
300
}
301
$url = $this->urlEncode( $pair[1] );
0 commit comments