From a78c761e7eb53eaeafc0bebbb0e57ce5b9bdf85c Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Mon, 6 May 2013 18:23:47 +1200 Subject: [PATCH] FIX $parameterFields overriding core $fields --- code/Report.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/Report.php b/code/Report.php index 82c786d8..5cbbee7f 100644 --- a/code/Report.php +++ b/code/Report.php @@ -214,8 +214,8 @@ class SS_Report extends ViewableData { } // Add search fields is available - if($this->hasMethod('parameterFields') && $fields = $this->parameterFields()) { - foreach($fields as $field) { + if($this->hasMethod('parameterFields') && $parameterFields = $this->parameterFields()) { + foreach($parameterFields as $field) { // Namespace fields for easier handling in form submissions $field->setName(sprintf('filters[%s]', $field->getName())); $field->addExtraClass('no-change-track'); // ignore in changetracker @@ -420,4 +420,4 @@ abstract class SS_ReportWrapper extends SS_Report { public function canView($member = null) { return $this->baseReport->canView($member); } -} \ No newline at end of file +}