mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
587b065fc2
commit
275ecfd8a9
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user