diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php index 63972b87..ace32e80 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Controller/RecoveryTokenController.php @@ -65,7 +65,7 @@ public function collection(Request $request): JsonCollectionResponse sprintf('Received search request for recovery tokens with params: %s', $request->getQueryString()), ); $query = new RecoveryTokenQuery(); - $query->identityId = new IdentityId($request->get('identityId')); + $query->identityId = $request->get('identityId') ? new IdentityId($request->get('identityId')) : null; $query->type = $request->get('type'); $query->status = $request->get('status'); $query->institution = $request->get('institution'); diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php index f047a96f..cbd11073 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php @@ -169,7 +169,7 @@ public function jsonSerialize(): array return [ 'actor_id' => $this->actorId, 'actor_institution' => $this->actorInstitution instanceof Institution ? (string)$this->actorInstitution : null, - 'actor_common_name' => $this->actorCommonName, + 'actor_common_name' => (string)$this->actorCommonName, 'identity_id' => $this->identityId, 'identity_institution' => (string)$this->identityInstitution, 'ra_institution' => (string)$this->raInstitution,