mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Fixed use of undefined constant error, and undefined variable error in TableField stopping CMS user from adding records to a TableField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69870 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
263c6fa125
commit
8c88519d9f
@ -233,7 +233,7 @@ class TableField extends TableListField {
|
||||
foreach($newitems as $k => $newitem){
|
||||
$fieldset = $this->FieldSetForRow();
|
||||
if($fieldset){
|
||||
$newitem[ID] = "new".$k;
|
||||
$newitem['ID'] = "new".$k;
|
||||
foreach($newitem as $k => $v){
|
||||
if($this->extraData && array_key_exists($k, $this->extraData)){
|
||||
unset($newitem[$k]);
|
||||
@ -563,7 +563,8 @@ JS;
|
||||
}
|
||||
}
|
||||
|
||||
function validate($validator){
|
||||
function validate($validator) {
|
||||
$errorMessage = '';
|
||||
$valid = true;
|
||||
$fields = $this->SubmittedFieldSet($sourceItemsNew);
|
||||
$fields = new FieldSet($fields);
|
||||
|
Loading…
x
Reference in New Issue
Block a user