Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Jul 10, 2024
1 parent c2aab1e commit b5ea073
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Collection/EntityCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function set(EntityDto $newOrUpdatedEntity): void

public function first(): ?EntityDto
{
return reset($this->entities);
return $this->entities[array_key_first($this->entities)] ?? null;
}

public function offsetExists(mixed $offset): bool
Expand Down
2 changes: 1 addition & 1 deletion src/Orm/EntityRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ private function getSearchablePropertiesConfig(QueryBuilder $queryBuilder, Searc
$associatedEntityAlias = $associatedPropertyName = '';
for ($i = 0; $i < $numAssociatedProperties - 1; ++$i) {
$associatedEntityName = $associatedProperties[$i];
$associatedEntityAlias = Escaper::escapeDqlAlias($associatedEntityName).($i ?? '');
$associatedEntityAlias = Escaper::escapeDqlAlias($associatedEntityName).((string) $i);
$associatedPropertyName = $associatedProperties[$i + 1];

if (!\in_array($associatedEntityAlias, $entitiesAlreadyJoined, true)) {
Expand Down

0 comments on commit b5ea073

Please sign in to comment.