Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update Collection.php
Bug fix in php 8.1
  • Loading branch information
isAref authored Sep 1, 2022
commit 24f31febf4dd1578b6be3e59deaeb46f73254077
7 changes: 5 additions & 2 deletions src/PHPHtmlParser/Dom/Node/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,12 @@ public function offsetUnset($offset): void
*
* @return mixed
*/
public function offsetGet($offset)
public function offsetGet(mixed $offset): mixed

{
return $this->collection[$offset] ?? null;

return $this->collection[$offset] ?? '';

}

/**
Expand Down