<commit_before><?php

class dmAdminLinkTag extends dmBaseLinkTag
{
  protected
  $serviceContainer;
  
  public function __construct($resource, dmAdminBaseServiceContainer $serviceContainer, array $options)
  {
    $this->resource         = empty($resource) ? '@homepage' : $resource;
    $this->serviceContainer = $serviceContainer;
    
    $this->initialize($options);
  }
  
  protected function initialize(array $options = array())
  {
    parent::initialize($options);

    $this->addAttributeToRemove(array('external_blank'));
    
    if($this->options['external_blank'] && strpos($this->resource, '://'))
    {
      try
      {
        $absoluteUrlRoot = dmArray::get($this->serviceContainer->getParameter('request.context'), 'absolute_url_root');

        if(0 !== strncmp($this->resource, $absoluteUrlRoot, strlen($absoluteUrlRoot)))
        {<commit_msg>Fix segmentation fault with PHP 5.3<commit_after><?php

class dmAdminLinkTag extends dmBaseLinkTag
{
  protected
  $serviceContainer;
  
  public function __construct($resource, dmAdminBaseServiceContainer $serviceContainer, array $options)
  {
    $this->resource         = empty($resource) ? '@homepage' : $resource;
    $this->serviceContainer = $serviceContainer;
    
    $this->initialize($options);
  }
  
  protected function initialize(array $options = array())
  {
    parent::initialize($options);

    $this->addAttributeToRemove(array('external_blank'));
    
    if($this->options['external_blank'] && is_string($this->resource) && strpos($this->resource, '://'))
    {
      try
      {
        $absoluteUrlRoot = dmArray::get($this->serviceContainer->getParameter('request.context'), 'absolute_url_root');

        if(0 !== strncmp($this->resource, $absoluteUrlRoot, strlen($absoluteUrlRoot)))
        {
{'fraction_non_alphanumeric': 0.14781634938409854, 'fraction_numerical': 0.0022396416573348264, 'mean_word_length': 4.105714285714286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 22, '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': '2489645', 'n_tokens_mistral': 511, 'n_tokens_neox': 498, 'n_words': 82}