Project

General

Profile

Actions

Bug #82142

closed

PHP Warning: Invalid argument supplied for foreach() in PreparedStatement.php line 419

Added by Kay Strobach over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2017-08-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

 if ($this->statement instanceof \mysqli_stmt) {
            if ($this->buffer === null) {
                $variables = [];
                $this->buffer = [];
                foreach ($this->fields as $field) { <<<< check if is_array or even better is http://de1.php.net/manual/en/function.is-iterable.php here

Is triggered via the following call stack:

typo3/sysext/frontend/Classes/Authentication/FrontendUserAuthentication.php in fetchSessionData at line 399
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php in initFEuser at line 1089
typo3/typo3_src-7.6.21/typo3/sysext/frontend/Classes/Http/RequestHandler.php in handleRequest at line 118
typo3/typo3_src-7.6.21/typo3/sysext/core/Classes/Core/Bootstrap.php in handleRequest at line 302
typo3/typo3_src-7.6.21/typo3/sysext/frontend/Classes/Http/Application.php in run at line 78
typo3/typo3_src-7.6.21/index.php in {closure} at line 33
typo3/typo3_src-7.6.21/index.php in null at line 34

PHP Version: 5.6.30-0+deb8u1

Actions #1

Updated by Kay Strobach about 6 years ago

please close this one for master

Actions #2

Updated by Georg Ringer about 6 years ago

  • Status changed from New to Closed
Actions #3

Updated by Stephan Großberndt about 6 years ago

As explained in https://typo3.slack.com/archives/C03AM9R17/p1522132128000129 this is an issue only in TYPO3 7.6 in combination with a custom extension as the core only assigns an array to $field and checks for is_array otherwise: https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_7-6/typo3/sysext/core/Classes/Database/PreparedStatement.php#L385

Actions

Also available in: Atom PDF