File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/Plugin/os2web/DataLookup Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ public function lookup($cvr) {
7474 }
7575
7676 $ cvrResult = new CompanyLookupResult ();
77- if ($ result && isset ($ result ->virksomhed ) && !empty ($ result ->virksomhed )) {
77+ if ($ result && isset ($ result ->virksomhed ) && !empty (( array ) $ result ->virksomhed )) {
7878 $ cvrResult ->setSuccessful ();
7979 $ cvrResult ->setCvr ($ cvr );
8080
Original file line number Diff line number Diff line change @@ -74,9 +74,9 @@ public function lookup($param) {
7474 }
7575
7676 $ cvrResult = new CompanyLookupResult ();
77- if ($ result && isset ($ result ->produktionsenhed ) && !empty ($ result ->produktionsenhed )) {
77+ if ($ result && isset ($ result ->produktionsenhed ) && !empty (( array ) $ result ->produktionsenhed )) {
7878 $ cvrResult ->setSuccessful ();
79- $ cvrResult ->setCvr ($ result ->produktionsenhed ->tilknyttetVirksomhedsCVRNummer );
79+ $ cvrResult ->setCvr ($ result ->produktionsenhed ->tilknyttetVirksomhedsCVRNummer ?? '' );
8080
8181 if ($ result ->produktionsenhedsnavn ) {
8282 $ cvrResult ->setName ($ result ->produktionsenhedsnavn ->vaerdi );
You can’t perform that action at this time.
0 commit comments