Actions
Bug #53014
closedDatabaseConnection admin_get_fields and admin_get_keys don't check if the query result is valid
Status:
Closed
Priority:
Should have
Assignee:
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2013-10-21
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:
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.
Actions