Actions
Bug #61929
closedDBAL: admin_query() produces wrong error, because it accesses 'TABLE' before check if query can be correctly parsed...
Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2014-09-28
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:
Description
Pseudo:
admin_query($query): // sysext/dbal/Classes/Database/DatabaseConnection.php - line 2863
$parsedQuery = parseSQL($query);
$ORIG_table = $parsedQuery['TABLE']; // << here is the problem!
if (!is_array($parsedQuery)) {
throw new \InvalidArgumentException('ERROR: Query could not be parsed: "' . htmlspecialchars($parsedQuery) . '". Query: "' . htmlspecialchars($query) . '"', 1310027793);
}
Should be:
$parsedQuery = parseSQL($query);
if (!is_array($parsedQuery)) {
throw new \InvalidArgumentException('ERROR: Query could not be parsed: "' . htmlspecialchars($parsedQuery) . '". Query: "' . htmlspecialchars($query) . '"', 1310027793);
}
$ORIG_table = $parsedQuery['TABLE'];
Actions