PHORAX / formhandler

Fork of TYPO3 extension «Formhandler»
GNU General Public License v2.0
36 stars 54 forks source link

FileRequired errorcheck PHP error > count() on noncountable object #61

Open vizlot opened 3 years ago

vizlot commented 3 years ago

suggestion to make a simpler condition avoiding null variable

       if (!$found && !$sessionFiles[$this->formFieldName]) {
            $checkFailed = $this->getCheckFailed();
        }

https://github.com/PHORAX/formhandler/blob/5c941093fa837d2620821e25f3c557254cfae688/Classes/Validator/ErrorCheck/FileRequired.php#L35

TYPO3 8.7 Core: Error handler (FE): PHP Warning: count(): Parameter must be an array or an object that implements Countable in /sites/gazvacancy/htdocs/typo3conf/ext/formhandler/Classes/Validator/ErrorCheck/FileRequired.php line 35