BUGFIX: Use Object->hasMethod() instead of method_exists()

This fixes an issue when you pass a `PaginatedList` back from `ModelAdmin::getList()`
This commit is contained in:
madmatt 2015-11-01 09:10:29 +13:00
parent 587b065fc2
commit 275ecfd8a9

View File

@ -149,7 +149,7 @@ class GridField extends FormField {
return $this->modelClassName;
}
if($this->list && method_exists($this->list, 'dataClass')) {
if($this->list && $this->list->hasMethod('dataClass')) {
$class = $this->list->dataClass();
if($class) {