mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #3943 from patricknelson/3.1
FIX: Ensuring GridFieldDetailForm validator uses Object->hasMethod() to respect e...
This commit is contained in:
commit
59496be8eb
@ -95,7 +95,7 @@ class GridFieldDetailForm implements GridField_URLHandler {
|
||||
|
||||
// if no validator has been set on the GridField and the record has a
|
||||
// CMS validator, use that.
|
||||
if(!$this->getValidator() && method_exists($record, 'getCMSValidator')) {
|
||||
if(!$this->getValidator() && (method_exists($record, 'getCMSValidator') || $record instanceof Object && $record->hasMethod('getCMSValidator'))) {
|
||||
$this->setValidator($record->getCMSValidator());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user