Bug #53014
closedDatabaseConnection admin_get_fields and admin_get_keys don't check if the query result is valid
100%
Description
In DatabaseConnection the two methods admin_get_fields and admin_get_keys throw a fatal error when the table name does not exist and tell that the method "fetch_assoc" cannot be called on a non object.
This happens because $this->link->query() returns false on failure. The fatal cannot be catched, and checking for an existing table in advance is cumbersome. The result of $this->link->query() should be checked for failure, like in the method admin_get_tables and an empty result should be returned.
Updated by Gerrit Code Review about 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24940
Updated by Thomas Maroschik about 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset a06db074d97a8dc12d16501c79cdb218ccc24f44.
Updated by Francois Suter about 11 years ago
- Category set to Database API (Doctrine DBAL)
- Status changed from Resolved to Accepted
- Target version set to next-patchlevel
- PHP Version set to 5.3
- Complexity set to no-brainer
This should be backported to 6.0 and 6.1. The problem exists since the migration to PDO.
Updated by Gerrit Code Review about 11 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25484
Updated by Thomas Maroschik about 11 years ago
- Status changed from Under Review to Resolved
Applied in changeset fa87ad9d1057bc700ebbb3ad7914aa988f5e8829.