From 275ecfd8a95d4f7a025bb5025bb8d729a0e9eb70 Mon Sep 17 00:00:00 2001 From: madmatt Date: Sun, 1 Nov 2015 09:10:29 +1300 Subject: [PATCH] BUGFIX: Use `Object->hasMethod()` instead of `method_exists()` This fixes an issue when you pass a `PaginatedList` back from `ModelAdmin::getList()` --- forms/gridfield/GridField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forms/gridfield/GridField.php b/forms/gridfield/GridField.php index c18115514..ca9fa7f61 100644 --- a/forms/gridfield/GridField.php +++ b/forms/gridfield/GridField.php @@ -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) {