Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #30 from halkyon/undefined_var_fix

Fixing undefined variable $dataList
  • Loading branch information...
commit a8950160c8acafc16fb7a5334cd6afd84ac2aa4f 2 parents b41da2d + c40488a
@UndefinedOffset authored
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;
Please sign in to comment.
Something went wrong with that request. Please try again.