Project

General

Profile

Actions

Bug #30871

closed

Error: Invalid argument supplied for foreach()

Added by Arno Dudek about 13 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2011-10-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
5.3
Tags:
FormWizard
Complexity:
Is Regression:
Sprint Focus:

Description

Get following error in log.

Core: Error handler (FE): PHP Warning: Invalid argument supplied for foreach() in www/typo3conf/ext/form/Classes/System/Request/Request.php line 376

change

    private function removeFiles() {
        $values = $this->getByMethod();
        foreach ($values as $value) {
            if (is_array($value) && (isset($value['tempFilename']))) {
                t3lib_div::unlink_tempfile($value['tempFilename']);
            }
        }
    }

with

    private function removeFiles() {
        $values = $this->getByMethod();
        if (is_array($values)) {
            foreach ($values as $value) {
                if (is_array($value) && (isset($value['tempFilename']))) {
                    t3lib_div::unlink_tempfile($value['tempFilename']);
                }
            }
        }
    }

will help.

Actions

Also available in: Atom PDF