<commit_before><?php

class Sidane_Threadmarks_Helper_Threadmark extends XenForo_Template_Helper_Core
{

  public static function renderThreadmarkFlag($postId, $threadmarks)
  {
    if (array_key_exists($postId, $threadmarks)) {
      $threadmark = $threadmarks[$postId];
      $threadmarkPhrase = new XenForo_Phrase('threadmark');
      return "<span class='threadmarker' id='post-{$postId}'><strong>{$threadmarkPhrase}:</strong> {$threadmark['label']}</span>";
    }
  }

}<commit_msg>Ensure there are threadmarks before rendering threadmarker<commit_after><?php

class Sidane_Threadmarks_Helper_Threadmark extends XenForo_Template_Helper_Core
{

  public static function renderThreadmarkFlag($postId, $threadmarks)
  {
    if (count($threadmarks) > 0 && array_key_exists($postId, $threadmarks)) {
      $threadmark = $threadmarks[$postId];
      $threadmarkPhrase = new XenForo_Phrase('threadmark');
      return "<span class='threadmarker' id='post-{$postId}'><strong>{$threadmarkPhrase}:</strong> {$threadmark['label']}</span>";
    }
  }

}
{'fraction_non_alphanumeric': 0.14149139579349904, 'fraction_numerical': 0.0009560229445506692, 'mean_word_length': 6.122448979591836, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7619730', 'n_tokens_mistral': 335, 'n_tokens_neox': 323, 'n_words': 54}