We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 825b090 commit 0ac3a07Copy full SHA for 0ac3a07
1 file changed
src/Types/Event.php
@@ -144,7 +144,15 @@ protected function location(Entry $event): ?string
144
145
$locationField = config("events.collections.$collectionHandle.location_field", 'location');
146
147
- return $event->{$locationField};
+ if (is_null($location = $event->{$locationField})) {
148
+ return null;
149
+ }
150
+
151
+ if (! is_string($location)) {
152
153
154
155
+ return $location;
156
}
157
158
protected function supplement(CarbonInterface $date): ?Entry
0 commit comments