Merged in bugfix/HOR-2791 (pull request #5570)
HOR-2791 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
@@ -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);
|
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();
|
$variables = isset($result[2]) ? $result[2] : array();
|
||||||
foreach ($variables as $key => $value) {
|
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");
|
$jsonSearch = $this->jsonsf(G::json_decode($this->record["DYN_CONTENT"]), $value[0], $json->variable === "" ? "id" : "variable");
|
||||||
$a = $this->getValuesDependentFields($jsonSearch);
|
$a = $this->getValuesDependentFields($jsonSearch);
|
||||||
foreach ($a as $i => $v) {
|
foreach ($a as $i => $v) {
|
||||||
|
|||||||
Reference in New Issue
Block a user