Project

General

Profile

Actions

Bug #53014

closed

DatabaseConnection admin_get_fields and admin_get_keys don't check if the query result is valid

Added by Thomas Maroschik about 11 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
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.


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #53728: SQL view crashes Database ClosedFrancois Suter2013-11-18

Actions
Actions

Also available in: Atom PDF