Problem upgrading script to php5

Hi guys

Ive an inherited script that doesnt work now that the customer has been upgraded to php5 (at least im assuming thats the problem)


 
  //functions used below here
  function produce_XML_object_tree($raw_XML) {
      libxml_use_internal_errors(true);
      try {
          $xmlTree = new SimpleXMLElement($raw_XML);
      } catch (Exception $e) {
          // Something went wrong.
          $error_message = 'SimpleXMLElement threw an exception.';
          foreach(libxml_get_errors() as $error_line) {
              $error_message .= "\	" . $error_line->message;
          }
          trigger_error($error_message);
          return false;
      }
      return $xmlTree;
  }
 

always returns error

Parse error: syntax error, unexpected ‘{’ in /admin.php on line 78

which is the { after the try statement

Any help appreciated :slight_smile:

TIA

IGNORE THE ABOVE POST

CUSTOMER MISINFORMATION :x

admin please delete if possible