Commit: 87120c33ebb565e547bd010c3f31f06529b846fd Author: Sara Golemon <[email protected]> Thu, 18 Jul 2019 10:34:26 -0400 Parents: 4b52935a8675d6ff6d5b06258e6c74ef135fad35 Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=87120c33ebb565e547bd010c3f31f06529b846fd Log: Fix filtering logic Changed paths: M src/Repository/ReasonRepository.php Diff: diff --git a/src/Repository/ReasonRepository.php b/src/Repository/ReasonRepository.php index f46fdd7..9e4265a 100644 --- a/src/Repository/ReasonRepository.php +++ b/src/Repository/ReasonRepository.php @@ -414,11 +414,15 @@ your configure settings should be */ public function findByProject(string $project = ''): array { - $reasons = array_filter( - self::REASONS, - function ($reason) use ($project) { - return ($reason['project'] ?? '') === $project; - }); + $reasons = self::REASONS; + if ($project !== '') { + $reasons = array_filter( + $reasons, + function ($reason) use ($project) { + return ((($reason['project'] ?? '') === $project) || + (($reason['project'] ?? '') === '')); + }); + } $resolves = $variations = []; foreach ($reasons as $row) { -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
