API Stop using deprecated API

This commit is contained in:
Steve Boyd 2022-11-24 17:36:45 +13:00
parent fc36247598
commit 688b438e88

View File

@ -118,7 +118,7 @@ class FormSpamProtectionExtension extends Extension
// Add before field specified by insertBefore
$inserted = false;
if (!empty($options['insertBefore'])) {
$inserted = $this->owner->Fields()->insertBefore($field, $options['insertBefore']);
$inserted = $this->owner->Fields()->insertBefore($options['insertBefore'], $field);
}
if (!$inserted) {
// Add field to end if not added already