Skip to content

Commit

Permalink
No need to validate 'submit' fields
Browse files Browse the repository at this point in the history
Fixes warning 'Undefined array key 4' when submitting a form with PHP
8.1+

Fixes #318
  • Loading branch information
dregad committed Apr 19, 2023
1 parent d62df71 commit c81c7b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions syntax.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c81c7b7

Please sign in to comment.