mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Added check before foreach() to fix potential HMCTF bugs
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69377 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ae2cb53fb1
commit
1213a073a0
@ -124,10 +124,12 @@ class HasManyComplexTableField extends ComplexTableField {
|
||||
|
||||
function ExtraData() {
|
||||
$items = array();
|
||||
if($this->unpagedSourceItems) {
|
||||
foreach($this->unpagedSourceItems as $item) {
|
||||
if($item->{$this->joinField} == $this->controller->ID)
|
||||
$items[] = $item->ID;
|
||||
}
|
||||
}
|
||||
$list = implode(',', $items);
|
||||
$inputId = $this->id() . '_' . $this->htmlListEndName;
|
||||
return <<<HTML
|
||||
|
Loading…
x
Reference in New Issue
Block a user