Bug #79347

DB Check causes Php warning in QueryBuilder

Added by Christer V over 2 years ago. Updated almost 2 years ago.

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

100%

TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Stabilization Sprint

Description

Selecting "Database Relations" under "DB check" causes a php warning:

 PHP Warning: Missing argument 1 for Doctrine\DBAL\Query\QueryBuilder::orWhere(), called in typo3_src/typo3/sysext/core/Classes/Database/Query/QueryBuilder.php on line 651 and defined in vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 836

Associated revisions

Revision 32cb6480 (diff)
Added by Thomas Hohn over 2 years ago

[BUGFIX] DB Check causes PHP warnings and errors

In DatabaseIntegrityCheck the method selectNonEmptyRecordsWithFkeys
also needs to take the BLOB into account or else it will fail with
a PHP warning. Furthermore the returned tableColumns list may contain
quoted fields names if the field name can be interpreted as a keyword
for the used connection platform. This patch ensures the correct
column information is received before further processing is started.

Additionally the "Record Statics" module is fixed by checking for an
empty TCA table field which invokes an exception.

Resolves: #79347
Resolves: #79991
Resolves: #79992
Releases: master
Change-Id: Ie455abd2da90d7dabc773ec345b5c8a87b0b5836
Reviewed-on: https://review.typo3.org/51813
Reviewed-by: Christer V <>
Tested-by: Christer V <>
Tested-by: TYPO3com <>
Reviewed-by: Claus Due <>
Reviewed-by: Nicole Cordes <>
Tested-by: Nicole Cordes <>
Reviewed-by: Markus Klein <>
Reviewed-by: Anders Kostending <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Christer V over 2 years ago

  • Category set to Database API (Doctrine DBAL)

This is caused when you use the DB type BLOB. This will cause selectNonEmptyRecordsWithFkeys to generate a empty $whereClause. Which causes an warning when calling
$queryBuilder->orWhere(...$whereClause)->execute();

#2 Updated by Christer V over 2 years ago

  • Target version set to 8 LTS
  • Sprint Focus set to Stabilization Sprint

#3 Updated by Gerrit Code Review over 2 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/51813

#4 Updated by Gerrit Code Review over 2 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/51813

#5 Updated by Gerrit Code Review over 2 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/51813

#6 Updated by Gerrit Code Review over 2 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/51813

#7 Updated by Gerrit Code Review over 2 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/51813

#8 Updated by Gerrit Code Review over 2 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/51813

#9 Updated by Gerrit Code Review over 2 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/51813

#10 Updated by Gerrit Code Review over 2 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51813

#11 Updated by Thomas Hohn over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#12 Updated by Riccardo De Contardi almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF