Further to eab4f04 we need some attributes to render tree icons

This commit is contained in:
2025-03-22 22:56:22 +11:00
parent a57ee78492
commit 5bb573100b
2 changed files with 14 additions and 5 deletions

View File

@@ -14,6 +14,11 @@ use App\Classes\LDAP\Export\LDIF;
use App\Exceptions\Import\AttributeException;
use App\Exceptions\InvalidUsage;
/**
* An Entry in an LDAP server
*
* @notes https://ldap.com/ldap-dns-and-rdns
*/
class Entry extends Model
{
private const TAG_CHARS = 'a-zA-Z0-9-';
@@ -480,7 +485,7 @@ class Entry extends Model
return 'fas fa-theater-masks';
elseif (in_array('country',$objectclasses))
return sprintf('flag %s',strtolower(Arr::get($this->c,0)));
return sprintf('flag %s',strtolower(Arr::get($this->c ?: [],0)));
elseif (in_array('device',$objectclasses))
return 'fas fa-mobile-alt';