Switched order of the is_subclass_of check (Fixes #99)

This commit is contained in:
UndefinedOffset 2017-04-13 10:17:22 -03:00
parent e8eb7994fc
commit 1fecff9cc7

View File

@ -190,7 +190,7 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
if (!$many_many) {
$sng=singleton($gridField->getModelClass());
$fieldType=$sng->db($this->sortColumn);
if(!$fieldType || !(strtolower($fieldType) == 'int' || is_subclass_of('Int', $fieldType))) {
if(!$fieldType || !(strtolower($fieldType) == 'int' || is_subclass_of($fieldType, 'Int'))) {
if(is_array($fieldType)) {
user_error('Sort column '.$this->sortColumn.' could not be found in '.$gridField->getModelClass().'\'s ancestry', E_USER_ERROR);
}else {