From c81c7b7a0e07c9e4e7e24b7e972dc9b18c7e8b4c Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Thu, 20 Apr 2023 01:45:35 +0200 Subject: [PATCH] No need to validate 'submit' fields Fixes warning 'Undefined array key 4' when submitting a form with PHP 8.1+ Fixes #318 --- syntax.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/syntax.php b/syntax.php index 179e232..a43903a 100644 --- a/syntax.php +++ b/syntax.php @@ -310,6 +310,10 @@ private function _handlepost($data) { foreach($data['fields'] as $index => $field) { /** @var $field helper_plugin_bureaucracy_field */ + if($field->getFieldType() === 'submit') { + continue; + } + $isValid = true; if($field->getFieldType() === 'file') { $file = array();