Skip to content

Commit

Permalink
[4.4] Fix finder helper addContentType duplicate entry for key 'title' (
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedik authored May 20, 2024
1 parent c5b8617 commit 500cce3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion administrator/components/com_finder/src/Indexer/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,16 @@ public static function addContentType($title, $mime = null)
$db->setQuery($query);
$db->execute();

// Cache the result
$type = new \stdClass();
$type->title = $title;
$type->mime = $mime ?? '';
$type->id = (int) $db->insertid();

$types[$title] = $type;

// Return the new id.
return (int) $db->insertid();
return $type->id;
}

/**
Expand Down

0 comments on commit 500cce3

Please sign in to comment.