-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
When calling the ksort()
method on Ds\Map
I get the following error if the parameter is null
or a variable that is null
.
TypeError: Ds\Map::ksort() expects parameter 1 to be a valid callback, no array or string given
Omitting the parameter entirely works without issue.
The reason I'm running into this issue is that I actually have a few classes that basically wrap around the DS data structures. The particular method I have that causes this issue, is:
public function ksort(?callable $comparator = null): self
{
$this->items->ksort($comparator);
return $this;
}
In this case $this->items
is an instance of Ds\Map
.
Metadata
Metadata
Assignees
Labels
No labels