From 688b438e883c1f88fc63e24eeef77eaa3fd4ba43 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 24 Nov 2022 17:36:45 +1300 Subject: [PATCH] API Stop using deprecated API --- code/Extension/FormSpamProtectionExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/Extension/FormSpamProtectionExtension.php b/code/Extension/FormSpamProtectionExtension.php index fc2cfa9..f365f45 100644 --- a/code/Extension/FormSpamProtectionExtension.php +++ b/code/Extension/FormSpamProtectionExtension.php @@ -118,7 +118,7 @@ public function enableSpamProtection($options = array()) // 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