From b0d1ad1e9ca29992943911a42bf4ce155c40023f Mon Sep 17 00:00:00 2001 From: UndefinedOffset Date: Thu, 16 Oct 2014 10:25:23 -0300 Subject: [PATCH] Changed notice for many_many relationships if the extra field is not an int issue #62 --- code/forms/GridFieldSortableRows.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/forms/GridFieldSortableRows.php b/code/forms/GridFieldSortableRows.php index 3dfc5c9..caab808 100644 --- a/code/forms/GridFieldSortableRows.php +++ b/code/forms/GridFieldSortableRows.php @@ -164,7 +164,7 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP $extraFields=$owner->many_many_extraFields($gridField->getName()); if(!$extraFields || !array_key_exists($this->sortColumn, $extraFields) || !($extraFields[$this->sortColumn]=='Int' || is_subclass_of('Int', $extraFields[$this->sortColumn]))) { - user_error('Sort column '.$this->sortColumn.' must be an Int, column is of type '.$fieldType, E_USER_ERROR); + user_error('Sort column '.$this->sortColumn.' must be an Int, column is of type '.$extraFields[$this->sortColumn], E_USER_ERROR); exit; } }else {