[CssSelectorBridge] Fix URL filtering (#3676) (#3701)

Co-authored-by: tougaj <tougaj@users.noreply.github.com>
This commit is contained in:
ORelio 2023-09-24 16:12:30 +02:00 committed by GitHub
parent 0dc6c66840
commit ce353c1e4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,7 +114,7 @@ class CssSelectorBridge extends BridgeAbstract
{
if (!empty($url_pattern)) {
$url_pattern = '/' . str_replace('/', '\/', $url_pattern) . '/';
$links = array_filter($links, function ($url) {
$links = array_filter($links, function ($url) use ($url_pattern) {
return preg_match($url_pattern, $url) === 1;
});
}