Skip to content

Commit

Permalink
Fixed filters - Failed to apply filters when protocol was set
Browse files Browse the repository at this point in the history
  • Loading branch information
George-Cristian TUDORAN committed May 16, 2023
1 parent f6a315f commit ed8910c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GameServerQuery/Filter/AbstractFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public function apply(): array
if ($this->protocols) {
/** @var ProtocolInterface $serverProtocol */
$serverProtocol = $this->response[Result::GENERAL_CATEGORY][Result::GENERAL_APPLICATION_SUBCATEGORY];
$supportedProtocols = \array_filter($this->protocols, static function($protocol) use ($serverProtocol) {
return \is_subclass_of($serverProtocol, $protocol) || \is_a($serverProtocol, $protocol);
$supportedProtocols = \array_filter($this->protocols, static function(string $protocol) use ($serverProtocol) {
return \is_subclass_of($serverProtocol, $protocol) || \is_a($serverProtocol, $protocol, true);
});

if (!\count($supportedProtocols)) {
Expand Down

0 comments on commit ed8910c

Please sign in to comment.