Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/LookupResult/CompanyLookupResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ public function setAddress(string $address): void {
* The field value or the empty string if the field does not exist.
*/
public function getFieldValue(string $field): mixed {
if (property_exists($this, $field)) {
if (property_exists($this, $field) && isset($this->{$field})) {
return $this->{$field};
}

Expand Down
2 changes: 1 addition & 1 deletion src/LookupResult/CprLookupResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ public function hasGuardian(string $cpr): bool {
* The value of the field or the empty string.
*/
public function getFieldValue(string $field): mixed {
if (property_exists($this, $field)) {
if (property_exists($this, $field) && isset($this->{$field})) {
return $this->{$field};
}

Expand Down
Loading