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 #1

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

Actions #2

Updated by Thomas Maroschik about 11 years ago

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

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.

Actions #4

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

Actions #5

Updated by Francois Suter about 11 years ago

To 6.1 only.

Actions #6

Updated by Thomas Maroschik about 11 years ago

  • Status changed from Under Review to Resolved
Actions #7

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF