0

When I was running a process in ProcessMaker, I got error message "Fatal error in trigger", then I checked the error logs and found this

PHP Parse error:  syntax error, unexpected '}' in /opt/processmaker/workflow/engine/classes/class.pmScript.php(216) : eval()'d code on line 9.

Could anyone tell me please what should I do? Thank you so much for your help. Here's the code :

public function executeAndCatchErrors($sScript, $sCode)
    {
        ob_start('handleFatalErrors');
        set_error_handler('handleErrors');
        $_SESSION['_CODE_'] = $sCode;
        eval($sScript );
        $this->evaluateVariable();
        unset( $_SESSION['_CODE_'] );
        ob_end_flush();
    }
Silfia
  • 1
  • 1

1 Answers1

1

ProcessMaker supports Triggers, where you can embed PHP code directly into a workflow process. The code you have pasted is actually part of the ProcessMaker source code, which evaluates the triggers during the execution of a workflow process.

It appears though there is a PHP syntax error in a trigger rather than the source code itself.

In order to fix this issue, I would look at the process triggers and check for PHP syntax errors. I would also try and run through the process and see at what point you get the error and then check the triggers that are defined around the task that caused the error.

For more information on triggers, see: https://wiki.processmaker.com/3.0/Triggers

DarkKnight
  • 23
  • 6