From ce353c1e4f1ea7f2b1170fa3564dcdca85350c8c Mon Sep 17 00:00:00 2001 From: ORelio Date: Sun, 24 Sep 2023 16:12:30 +0200 Subject: [PATCH] [CssSelectorBridge] Fix URL filtering (#3676) (#3701) Co-authored-by: tougaj --- bridges/CssSelectorBridge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridges/CssSelectorBridge.php b/bridges/CssSelectorBridge.php index ce158758..8408633b 100644 --- a/bridges/CssSelectorBridge.php +++ b/bridges/CssSelectorBridge.php @@ -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; }); }