Browse files

Fixing undefined variable $dataList

  • Loading branch information...
1 parent b41da2d commit c40488a42321dc402b5b5220ea990766eb5c6307 @halkyon halkyon committed Feb 12, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 code/forms/GridFieldSortableRows.php
View
4 code/forms/GridFieldSortableRows.php
@@ -20,6 +20,8 @@ public function __construct($sortColumn) {
* @return Array Map where the keys are fragment names and the values are pieces of HTML to add to these fragments.
*/
public function getHTMLFragments($gridField) {
+ $dataList = $gridField->getList();
+
if(class_exists('UnsavedRelationList') && $dataList instanceof UnsavedRelationList) {
return array();
}
@@ -246,6 +248,8 @@ public function handleAction(GridField $gridField, $actionName, $arguments, $dat
* @param Array $data Data submitted in the request
*/
protected function saveGridRowSort(GridField $gridField, $data) {
+ $dataList = $gridField->getList();
+
if(class_exists('UnsavedRelationList') && $dataList instanceof UnsavedRelationList) {
user_error('Cannot sort an UnsavedRelationList', E_USER_ERROR);
return;

0 comments on commit c40488a

Please sign in to comment.