mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR run checks before running hasMethod, as an extension does not neccessairily have that method.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90691 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a1fdff6910
commit
8216448da3
@ -1516,7 +1516,7 @@ class Member_Validator extends RequiredFields {
|
||||
// Execute the validators on the extensions
|
||||
if($this->extension_instances) {
|
||||
foreach($this->extension_instances as $extension) {
|
||||
if($extension->hasMethod('updatePHP')) {
|
||||
if(method_exists($extension, 'hasMethod') && $extension->hasMethod('updatePHP')) {
|
||||
$valid &= $extension->updatePHP($data, $this->form);
|
||||
}
|
||||
}
|
||||
@ -1539,7 +1539,7 @@ class Member_Validator extends RequiredFields {
|
||||
// Execute the validators on the extensions
|
||||
if($this->extension_instances) {
|
||||
foreach($this->extension_instances as $extension) {
|
||||
if($extension->hasMethod('updateJavascript')) {
|
||||
if(method_exists($extension, 'hasMethod') && $extension->hasMethod('updateJavascript')) {
|
||||
$extension->updateJavascript($js, $this->form);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user