Skip to content

Commit 7e9a304

Browse files
authored
Merge pull request #43537 from bembelimen/upmerges/2024-05-27
[5.1] Upmerges 2024-05-27
2 parents 745cef8 + 2ca3737 commit 7e9a304

File tree

1 file changed

+9
-1
lines changed
  • administrator/components/com_finder/src/Indexer

1 file changed

+9
-1
lines changed

administrator/components/com_finder/src/Indexer/Helper.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,16 @@ public static function addContentType($title, $mime = null)
254254
$db->setQuery($query);
255255
$db->execute();
256256

257+
// Cache the result
258+
$type = new \stdClass();
259+
$type->title = $title;
260+
$type->mime = $mime ?? '';
261+
$type->id = (int) $db->insertid();
262+
263+
$types[$title] = $type;
264+
257265
// Return the new id.
258-
return (int) $db->insertid();
266+
return $type->id;
259267
}
260268

261269
/**

0 commit comments

Comments
 (0)