Handle better PHP Trigger Code

This commit is contained in:
FredericoFalcao 2025-06-07 15:02:10 +03:00 committed by GitHub
parent 1af6114322
commit f7008d3d0f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,6 +9,9 @@
* @return string The complete PHP code ready for sandbox execution.
*/
function generatePHPTriggerCode($functionName, $onUpdate_phpCode, $row) {
// Fix code if redundant opening PHP tag
if (substr($onUpdate_phpCode,0,5) == "<"."?"."php") $onUpdate_phpCode = substr($onUpdate_phpCode,5);
// Prepare the constants definition from the database
$constants = getConstantsDefinition();