Skip to content

Commit

Permalink
Fix object type call the method getName()
Browse files Browse the repository at this point in the history
  • Loading branch information
ArrayIterator committed Nov 10, 2023
1 parent 341af51 commit 096ade4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Packet/Records.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private function generateKey(ResourceRecordTypeInterface $record): string
return md5(
$record->getRData()
. $record->getHeader()
. $record->getType()
. $record->getType()->getName()
. $record->getName()
);
}
Expand Down Expand Up @@ -75,7 +75,7 @@ public function getFilteredType(string $type, bool $single = false) : null|array
$type = strtoupper(trim($type));
$result = [];
foreach ($this->getRecords() as $record) {
if ($record->getType() === $type) {
if ($record->getType()->getName() === $type) {
if ($single) {
return $record;
}
Expand Down

0 comments on commit 096ade4

Please sign in to comment.