mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #10040 from GuySartorelli/patch-5
ENH: Avoid "new" keyword to instantiate CompositeValidator
This commit is contained in:
commit
6b514ebd0c
@ -2547,7 +2547,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
|||||||
*/
|
*/
|
||||||
public function getCMSCompositeValidator(): CompositeValidator
|
public function getCMSCompositeValidator(): CompositeValidator
|
||||||
{
|
{
|
||||||
$compositeValidator = new CompositeValidator();
|
$compositeValidator = CompositeValidator::create();
|
||||||
|
|
||||||
// Support for the old method during the deprecation period
|
// Support for the old method during the deprecation period
|
||||||
if ($this->hasMethod('getCMSValidator')) {
|
if ($this->hasMethod('getCMSValidator')) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user