Commit 0df4c49d authored by Carsten  Rose's avatar Carsten Rose
Browse files

FormAction.php: Fix problem of missing FE_ID and FE COLUMN - not shown in exception.

parent bd6e6714
Pipeline #1099 passed with stage
in 1 minute and 32 seconds
......@@ -90,7 +90,8 @@ class FormAction {
foreach ($feSpecAction as $fe) {
// Preparation for Log, Debug
$this->store->setVar(SYSTEM_FORM_ELEMENT, Logger::formatFormElementName($fe), STORE_SYSTEM);
$this->store->setVar(SYSTEM_FORM_ELEMENT, Logger::formatFormElementName($fe), STORE_SYSTEM); // debug
$this->store->setVar(SYSTEM_FORM_ELEMENT_ID, $fe[FE_ID], STORE_SYSTEM); // debug
$fe = HelperFormElement::initActionFormElement($fe);
......@@ -100,12 +101,15 @@ class FormAction {
}
if (isset($fe[FE_FILL_STORE_VAR])) {
$rows = $this->evaluate->parse($fe[FE_FILL_STORE_VAR]);
$this->store->setVar(SYSTEM_FORM_ELEMENT_COLUMN, FE_FILL_STORE_VAR, STORE_SYSTEM); // debug
$rows = $this->evaluate->parse($fe[FE_FILL_STORE_VAR], ROW_REGULAR);
if (is_array($rows)) {
$this->store->appendToStore($rows[0], STORE_VAR);
} else {
if (!empty($rows)) {
throw new UserFormException("Invalid statement for 'fillStoreVar': " . $fe[FE_FILL_STORE_VAR], ERROR_INVALID_OR_MISSING_PARAMETER);
throw new UserFormException(json_encode(
[ERROR_MESSAGE_TO_USER => "Invalid statement for 'fillStoreVar'.",
ERROR_MESSAGE_SUPPORT => $fe[FE_FILL_STORE_VAR]]), ERROR_INVALID_OR_MISSING_PARAMETER);
}
}
$fe[FE_FILL_STORE_VAR] = ''; // do not process the same later on.
......@@ -291,7 +295,7 @@ class FormAction {
return;
}
if($fe[FE_EXPECT_RECORDS]===''){
if ($fe[FE_EXPECT_RECORDS] === '') {
throw new UserFormException("Missing parameter '" . FE_EXPECT_RECORDS . "'", ERROR_MISSING_EXPECT_RECORDS);
}
$expect = $this->evaluate->parse($fe[FE_EXPECT_RECORDS]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment