BUG 13974 "Error in triggers in lines of code commented" SOLVED
- Error in triggers in lines of code commented. - Problema Resuelto, Se valida el Script del triggers quitando todo los comnetarios que existe en el codigo antes de ser ejecutado, el cambio se lo realizo en el metodo "setScript($sScript = '')".
This commit is contained in:
@@ -151,6 +151,39 @@ class PMScript
|
||||
*/
|
||||
public function setScript ($sScript = '')
|
||||
{
|
||||
$nrt = array("\n", "\r", "\t");
|
||||
$nrthtml = array("(n /)", "(r /)", "(t /)");
|
||||
|
||||
$script = $sScript;
|
||||
$script = str_replace($nrt, $nrthtml, $script);
|
||||
|
||||
while (preg_match("/^(.*)\/\*(.*)$/", $script, $arrayMatch)) {
|
||||
$scriptAux = "";
|
||||
|
||||
if (preg_match("/^.*\*\/.*$/", $arrayMatch[2])) {
|
||||
$arrayAux = explode("*/", $arrayMatch[2]);
|
||||
unset($arrayAux[0]);
|
||||
$scriptAux = implode("*/", $arrayAux);
|
||||
}
|
||||
|
||||
$script = $arrayMatch[1] . $scriptAux;
|
||||
}
|
||||
|
||||
while (preg_match("/^(.*)(?:\/\/|#)(.*)$/", $script, $arrayMatch)) {
|
||||
$scriptAux = "";
|
||||
|
||||
if (preg_match("/^.*\(n\s\/\).*$/", $arrayMatch[2])) {
|
||||
$arrayAux = explode("(n /)", $arrayMatch[2]);
|
||||
unset($arrayAux[0]);
|
||||
$scriptAux = implode("(n /)", $arrayAux);
|
||||
}
|
||||
|
||||
$script = $arrayMatch[1] . $scriptAux;
|
||||
}
|
||||
|
||||
$script = str_replace($nrthtml, $nrt, $script);
|
||||
$sScript = $script;
|
||||
|
||||
$this->sScript = $sScript;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user