Bug #80075
closedPHP 7.1: QueryGenerator declares $this->queryConfig as an array but it used as array and string.
100%
Description
When using PHP 7.1 the DB Check module throws an exception when using the advanced search functionality, because of $this->queryConfig
being declared as a array but used as string and array.
In QueryGenerator::procesData $this->queryConfig
can be set to and string instead of an array. This causes cleanUpQueryConfig
to fail since indexing into and string will not created an array for the foreach to process.
Updated by Gerrit Code Review over 7 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51915
Updated by Kasper Ligaard over 7 years ago
- Priority changed from Should have to Must have
- Complexity set to no-brainer
This must be a "Must have" since TYPO8 LTS is to support PHP 7.1. Luckily this is also a no-brainer to fix.
Updated by Gerrit Code Review over 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51915
Updated by Kasper Ligaard over 7 years ago
The reason for this error in PHP 7.1 is only in the case when $queryString is empty:
The empty index operator is not supported for strings anymore
Applying the empty index operator to a string (e.g.$str[] = $x
) throws a fatal error instead of converting silently to array.
Ref.: https://secure.php.net/manual/en/migration71.incompatible.php#migration71.incompatible.empty-string-index-operator
Probably more to the point:
...As of PHP 7.1.0, assigning an empty string throws a fatal error. Formerly, it assigned a NULL byte.
Ref.: https://secure.php.net/manual/en/language.types.string.php#language.types.string.substr
Examples of the above for PHP 7.0 and PHP 7.1 respectively:
PHP 7.0:
$ php -a Interactive shell php > $a = ''; php > $a[] = 'b'; php >
PHP 7.1:
$ php -a Interactive shell php > $a = ''; php > $a[] = 'b'; Warning: Uncaught Error: [] operator not supported for strings in php shell code:1 Stack trace: #0 {main} thrown in php shell code on line 1 php >
Updated by Gerrit Code Review over 7 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51915
Updated by Gerrit Code Review over 7 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51915
Updated by Gerrit Code Review over 7 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51915
Updated by Gerrit Code Review over 7 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51915
Updated by Gerrit Code Review over 7 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51915
Updated by Gerrit Code Review over 7 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51944
Updated by Christer V over 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset efa373a98bb2329c6818d596b40c1cda969566e2.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed