From f0395bc86cf19886b4f3e7ec93aa4d9fdea726b9 Mon Sep 17 00:00:00 2001
From: Chris Wells <8843-cwells@users.noreply.drupalcode.org>
Date: Wed, 12 Feb 2025 16:26:12 +0000
Subject: [PATCH] Issue #3505249 by chrisfromredfin, phenaproxima: Core source
 plugin categories not working

---
 src/Plugin/ProjectBrowserSource/DrupalCore.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Plugin/ProjectBrowserSource/DrupalCore.php b/src/Plugin/ProjectBrowserSource/DrupalCore.php
index c981015a4..48868d196 100644
--- a/src/Plugin/ProjectBrowserSource/DrupalCore.php
+++ b/src/Plugin/ProjectBrowserSource/DrupalCore.php
@@ -113,7 +113,7 @@ final class DrupalCore extends ProjectBrowserSourceBase {
 
     // Filter by categories.
     if (!empty($query['categories'])) {
-      $projects = array_filter($projects, fn(Project $project): bool => empty(array_intersect(array_column($project->categories, 'id'), explode(',', $query['categories']))));
+      $projects = array_filter($projects, fn(Project $project): bool => !empty(array_intersect(array_column($project->categories, 'id'), explode(',', $query['categories']))));
     }
 
     // Filter by search text.
-- 
GitLab