diff --git a/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php b/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php index c8dcc9ee98..2d68095cf9 100644 --- a/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php +++ b/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php @@ -912,10 +912,12 @@ public function loadVersionInfoList(array $contentIds): array { $rows = $this->contentGateway->loadVersionInfoList($contentIds); $mappedRows = array_map( - static fn ($row) => [ - 'id' => $row['ezcontentobject_id'], - 'version' => $row['ezcontentobject_version_version'], - ], + static function ($row) { + return [ + 'id' => $row['ezcontentobject_id'], + 'version' => $row['ezcontentobject_version_version'], + ]; + }, $rows, ); diff --git a/eZ/Publish/Core/Persistence/Legacy/Tests/Content/Gateway/DoctrineDatabaseTest.php b/eZ/Publish/Core/Persistence/Legacy/Tests/Content/Gateway/DoctrineDatabaseTest.php index fadbdcfc49..0951741d31 100644 --- a/eZ/Publish/Core/Persistence/Legacy/Tests/Content/Gateway/DoctrineDatabaseTest.php +++ b/eZ/Publish/Core/Persistence/Legacy/Tests/Content/Gateway/DoctrineDatabaseTest.php @@ -2132,7 +2132,7 @@ public function testLoadVersionInfoList(): void $results = $gateway->loadVersionInfoList([11]); - $orig = include __DIR__ . '/../_fixtures/extract_version_info_from_rows_multiple_versions.php'; + $orig = include_once __DIR__ . '/../_fixtures/extract_version_info_from_rows_multiple_versions.php'; $this->assertEquals( [$orig[1]],