diff --git a/src/Component/Event.php b/src/Component/Event.php index e58c015e..8624a945 100644 --- a/src/Component/Event.php +++ b/src/Component/Event.php @@ -432,7 +432,7 @@ public function setLocation($location, $title = '', $geo = null) { if (is_scalar($geo)) { $geo = Geo::fromString($geo); - } elseif (!$geo instanceof Geo) { + } elseif (!is_null($geo) && !$geo instanceof Geo) { $className = get_class($geo); throw new \InvalidArgumentException( "The parameter 'geo' must be a string or an instance of " . Geo::class