Commit 5e767288 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Save.php: add specific error message for missing slaveId Definition.

parent 30ad9dd8
......@@ -158,6 +158,7 @@ const ERROR_MISSING_CONFIG_INI_VALUE = 1070;
const ERROR_SENDMAIL = 1071;
const ERROR_SENDMAIL_MISSING_VALUE = 1072;
const ERROR_OVERWRITE_RECORD_ID = 1073;
const ERROR_MISSING_SLAVE_ID_DEFINITION = 1074;
// Subrecord
const ERROR_SUBRECORD_MISSING_COLUMN_ID = 1100;
......
......@@ -384,6 +384,10 @@ class Save {
$flagUpdateSlaveId = false;
$flagSlaveDeleted = false;
if(!isset($fe[FE_SLAVE_ID])) {
throw new UserFormException("Missing 'slaveId'-definition", ERROR_MISSING_SLAVE_ID_DEFINITION);
}
// Get the slaveId
$slaveId = Support::falseEmptyToZero($this->evaluate->parse($fe[FE_SLAVE_ID]));
// Store the slaveId: it's used and replaced in the update statement.
......
Markdown is supported
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