title: /opt/plesk/php/7.0/bin/php': free() - Error
body: <p>I get this error:
  <a href="https://pastebin.com/5E11vT52" rel="nofollow noreferrer">(because of char limitations on pastebin.com)</a></p>
  
  <p>And I know that I get this error only because I want to make a triangle replacement. I know that because before I implement the triangle replacement, everything worked fine...</p>
  
  <p>What I want to do is to get all <code>price</code> and <code>price_base</code> tags and swap them. But I do not know why PHP is complaining about that...</p>
  
  <p>Here is the code:</p>
  
  <pre><code>function specialPriceToPrice($dom, $path ,$price, $specialPrice)
  {
  
      $doc = simplexml_import_dom($dom);
      $items = $doc-&gt;xpath("//$path");
      foreach ($items as $item) {
          $node = dom_import_simplexml($item);
  
          $tmp = $node-&gt;getElementsByTagName($specialPrice)-&gt;item(0)-&gt;textContent;
  
          if($tmp != ""){
              $tmp2 = $node-&gt;getElementsByTagName($price)-&gt;item(0)-&gt;textContent;
              $node-&gt;getElementsByTagName($price)-&gt;item(0)-&gt;textContent = $tmp;
              $node-&gt;getElementsByTagName($specialPrice)-&gt;item(0)-&gt;textContent = $tmp2;
  
              $tmp = null;
              $tmp2 = null;
          }
  
          $node = null;
          $tmp = null;
          $tmp2 = null;
          $item = null;
      }
  
      $doc = null;
      $items = null;
  }
  </code></pre>
  
  <p>I also tried <code>$tmp != null</code>- but same result...
  Can it be that this error comes up because of the feed?</p>
  
  <p>Because sometimes I have a <code>price_base</code> which looks like this <code>&lt;price_base/&gt;</code> but it could also be that it looks like <code>&lt;price_base&gt;&lt;/price_base&gt;</code>. And of course, sometimes it's filled 13.13.</p>
  
  <p><a href="http://j-trier.de/cronjob/data/raw/gamebillet.xml" rel="nofollow noreferrer">Here is the raw feed</a> (I rename <code>special_price</code> to <code>price_base</code>)</p>
  
  <p>http: //j-trier.de/cronjob/data/gamebillet.xml (Not allowed more then 2 links)</p>
  
  <p>Could the error because in my output feed the <code>price_base</code> ends with <code>/</code> and not starts with <code>/</code>?</p>
  
  <p>Greetings and Thank You!</p>