Skip to content

Commit 2ca3737

Browse files
committed
Merge remote-tracking branch 'Joomla/4.4-dev' into upmerges/2024-05-27
2 parents 745cef8 + 500cce3 commit 2ca3737

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)