JayBizzle / Crawler-Detect

🕷 CrawlerDetect is a PHP class for detecting bots/crawlers/spiders via the user agent
https://crawlerdetect.io
MIT License
1.98k stars 256 forks source link

reset matches when testing an empty UA #529

Closed tbussmann closed 3 months ago

tbussmann commented 4 months ago

Make sure, getMatches will not return stale data if the last test was performed for an empty UA or only consists of excluded patterns.

tbussmann commented 4 months ago

We could furthermore reset the $matches when setUserAgent or setHttpHeaders is executed but this would be a change in behaviour.

JayBizzle commented 4 months ago

Thank you ❤️