Merge pull request #4728 from madmatt/pulls/gridfield-list-fix

BUGFIX: Use Object->hasMethod() instead of method_exists()
This commit is contained in:
Damian Mooyman 2015-11-02 10:39:18 +13:00
commit 0d1bdd58b3

View File

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