diff --git a/src/Parser/RobotsTxtParser.php b/src/Parser/RobotsTxtParser.php index e7808f1..1fedb70 100644 --- a/src/Parser/RobotsTxtParser.php +++ b/src/Parser/RobotsTxtParser.php @@ -68,6 +68,10 @@ private function parseTxt($txt) { $result = []; $lines = array_map('trim', mb_split('\r\n|\n|\r', $txt)); + // If robots txt is empty + if (empty($lines)) { + return false; + } // Parse each line individually foreach ($lines as $key => $line) { // Limit rule length