lotgd / core

Core functionality for Legend of the Green Dragon, a text-based RPG game.
GNU Affero General Public License v3.0
152 stars 15 forks source link

Scene->getConnectionGroup causes a TypeError if the filtered collection is empty #150

Closed Vassyli closed 3 years ago

Vassyli commented 3 years ago
    public function getConnectionGroup(string $name): SceneConnectionGroup
    {
        return $this->filterConnectionGroupCollectionByName($name)->first();
    }

CollectionInterface->first() returns false if the collection is empty, causing PHP to throw a TypeError.