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,9 +124,11 @@ class HasManyComplexTableField extends ComplexTableField {
|
|||||||
|
|
||||||
function ExtraData() {
|
function ExtraData() {
|
||||||
$items = array();
|
$items = array();
|
||||||
foreach($this->unpagedSourceItems as $item) {
|
if($this->unpagedSourceItems) {
|
||||||
if($item->{$this->joinField} == $this->controller->ID)
|
foreach($this->unpagedSourceItems as $item) {
|
||||||
$items[] = $item->ID;
|
if($item->{$this->joinField} == $this->controller->ID)
|
||||||
|
$items[] = $item->ID;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$list = implode(',', $items);
|
$list = implode(',', $items);
|
||||||
$inputId = $this->id() . '_' . $this->htmlListEndName;
|
$inputId = $this->id() . '_' . $this->htmlListEndName;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user