This commit is contained in:
Roly Rudy Gutierrez Pinto
2017-03-27 11:29:02 -04:00
parent bf56da719b
commit 838fc5c68a

View File

@@ -754,6 +754,10 @@ class pmDynaform
preg_match_all('/\@(?:([\@\%\#\=\!Qq])([a-zA-Z\_]\w*)|([a-zA-Z\_][\w\-\>\:]*)\(((?:[^\\\\\)]*?)*)\))/', $json->sql, $result, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE);
$variables = isset($result[2]) ? $result[2] : array();
foreach ($variables as $key => $value) {
//Prevents an infinite cycle. If the name of the variable is used within its own dependent.
if ($value[0] === $json->variable) {
continue;
}
$jsonSearch = $this->jsonsf(G::json_decode($this->record["DYN_CONTENT"]), $value[0], $json->variable === "" ? "id" : "variable");
$a = $this->getValuesDependentFields($jsonSearch);
foreach ($a as $i => $v) {