Skip to content

Commit a81c4b5

Browse files
committed
Entities may not have a primary name attribute
1 parent 6170aaf commit a81c4b5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Entity.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ public function __get( $property ) {
176176
break;
177177
case 'DISPLAYNAME':
178178
$attribute = $this->metadata()->primaryNameAttribute;
179+
if ( !$attribute ) {
180+
return null;
181+
}
179182

180183
return ( $this->propertyValues[ $attribute ]['Value'] ) ? $this->propertyValues[ $attribute ]['Value'] : null;
181184
break;

0 commit comments

Comments
 (0)