File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ public function toArray(): array
4646 $ fields [$ field ->key ()] = $ field ->toArray ();
4747 continue ;
4848 }
49+ if ($ field instanceof \Spameri \ElasticQuery \Mapping \Settings \Mapping \SubFields) {
50+ $ fields [$ field ->key ()] = $ field ->toArray ();
51+ continue ;
52+ }
4953 if ($ field instanceof \Spameri \ElasticQuery \Mapping \Settings \Mapping \NestedObject) {
5054 $ fields [$ field ->key ()] = $ field ->toArray ();
5155 continue ;
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ public function getSubValue($key)
8686 if (\str_contains ($ key , \Spameri \ElasticQuery \Mapping \Settings \Mapping \FieldSeparator::FIELD_SEPARATOR ) === TRUE ) {
8787 $ levels = \explode (\Spameri \ElasticQuery \Mapping \Settings \Mapping \FieldSeparator::FIELD_SEPARATOR , $ key );
8888
89- $ value = $ this ->source [$ levels [0 ]];
89+ $ value = $ this ->source [$ levels [0 ]] ?? NULL ;
9090 unset($ levels [0 ]);
9191
9292 foreach ($ levels as $ subKey ) {
You can’t perform that action at this time.
0 commit comments