Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

263
Views
/opt/plesk/php/7.0/bin/php': free() - Error

I get this error: (because of char limitations on pastebin.com)

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...

What I want to do is to get all price and price_base tags and swap them. But I do not know why PHP is complaining about that...

Here is the code:

function specialPriceToPrice($dom, $path ,$price, $specialPrice)
{

    $doc = simplexml_import_dom($dom);
    $items = $doc->xpath("//$path");
    foreach ($items as $item) {
        $node = dom_import_simplexml($item);

        $tmp = $node->getElementsByTagName($specialPrice)->item(0)->textContent;

        if($tmp != ""){
            $tmp2 = $node->getElementsByTagName($price)->item(0)->textContent;
            $node->getElementsByTagName($price)->item(0)->textContent = $tmp;
            $node->getElementsByTagName($specialPrice)->item(0)->textContent = $tmp2;

            $tmp = null;
            $tmp2 = null;
        }

        $node = null;
        $tmp = null;
        $tmp2 = null;
        $item = null;
    }

    $doc = null;
    $items = null;
}

I also tried $tmp != null- but same result... Can it be that this error comes up because of the feed?

Because sometimes I have a price_base which looks like this <price_base/> but it could also be that it looks like <price_base></price_base>. And of course, sometimes it's filled 13.13.

Here is the raw feed (I rename special_price to price_base)

http: //j-trier.de/cronjob/data/gamebillet.xml (Not allowed more then 2 links)

Could the error because in my output feed the price_base ends with / and not starts with /?

Greetings and Thank You!

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!