Skip to content

Commit 0a3c480

Browse files
committed
fixup! IBX-7579:Richtext: Rows are added to ezurl_object_link on every save
1 parent e6f6d4e commit 0a3c480

File tree

1 file changed

+8
-2
lines changed
  • src/lib/eZ/FieldType/RichText/RichTextStorage

1 file changed

+8
-2
lines changed

src/lib/eZ/FieldType/RichText/RichTextStorage/Gateway.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,17 @@ public function insertUrl($url)
8181
/**
8282
* Return a list of URLs used by the given field and version.
8383
*
84-
* @return bool[] An array of URLs, with urls as keys
84+
* array<string, boolean> An array of URLs, with urls as keys
8585
*/
8686
public function getUrlsFromUrlLink(int $fieldId, int $versionNo): array
8787
{
88-
return $this->urlGateway->getUrlsFromUrlLink($fieldId, $versionNo);
88+
$rows = $this->urlGateway->getUrlsFromUrlLink($fieldId, $versionNo);
89+
$result = [];
90+
foreach ($rows as $url) {
91+
$result[$url] = true;
92+
}
93+
94+
return $result;
8995
}
9096

9197
/**

0 commit comments

Comments
 (0)