fix non string value check

This commit is contained in:
Daniel Seifert 2022-11-12 23:49:39 +01:00
parent 83c3e975c3
commit c971adcb69
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170
2 changed files with 2 additions and 2 deletions

View File

@ -175,6 +175,6 @@ class PublicKeyCredential extends BaseModel
);
$oxid = $qb->execute()->fetchOne();
return strlen($oxid) ? $oxid : null;
return is_string($oxid) && strlen($oxid) ? $oxid : null;
}
}

View File

@ -66,7 +66,7 @@ class PublicKeyCredentialList extends ListModel implements PublicKeyCredentialSo
);
$credential = $qb->execute()->fetchOne();
if (!strlen($credential)) {
if (!is_string($credential) || !strlen($credential)) {
return null;
}