Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#817706
I have this error message when opening a form: Warning: Invalid argument supplied for foreach() in /opt/processmaker/workflow/engine/classes/class.pmDynaform.php on line 539

It doesn't always happen and even if I remove all my javascript code, it still shows this error. I don,t know what triggers this error, any idea?
#817709
amosbatto wrote: Mon Nov 12, 2018 5:14 pm What version of PM are you using? In version 3.2.1 (which was the last version of PM to use the class.pmDynaform.php file, I don't see a foreach on line 539. Also are you using Bitnami or a manual install? Also what version of PHP do you have installed?
I'm using version 3.1.3. Manual Install and our PHP version is 5.6.32
#817711
Line 539 is: foreach ($rows as $keyRow => $row) {
Code: Select all
//grid
                if ($key === "type" && ($value === "grid")) {
                    if (isset($this->fields["APP_DATA"][$json->name])) {
                        //rows
                        $rows = $this->fields["APP_DATA"][$json->name];
                        foreach ($rows as $keyRow => $row) {
                            //cells
                            $cells = array();
                            foreach ($json->columns as $column) {
                                //data
                                if ($column->type === "text" || $column->type === "textarea" || $column->type === "dropdown" || $column->type === "suggest" || $column->type === "datetime" || $column->type === "checkbox" || $column->type === "file" || $column->type === "link" || $column->type === "hidden") {
                                    array_push($cells, array(
                                        "value" => isset($row[$column->name]) ? $row[$column->name] : "",
                                        "label" => isset($row[$column->name . "_label"]) ? $row[$column->name . "_label"] : (isset($row[$column->name]) ? $row[$column->name] : "")
                                    ));
                                }
                            }
                            $rows[$keyRow] = $cells;
                        }
                        $json->rows = count($rows);
                        $json->data = $rows;
                    }
                    //todo compatibility 'columnWidth'
                    foreach ($json->columns as $column) {
                        if (!isset($column->columnWidth) && $column->type !== "hidden") {
                            $json->layout = "static";
                            $column->columnWidth = "";
                        }
                    }
                }

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]

Betvisa clone scripts are pre-built software solut[…]