Skip to content

Commit

Permalink
[TASK] Make core/Tests/Unit/Database/ notice free
Browse files Browse the repository at this point in the history
Releases: master
Resolves: #84723
Change-Id: I4ed49cd7002fa8a0c002222c54249d714e91a379
Reviewed-on: https://review.typo3.org/56660
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
  • Loading branch information
janhelke authored and susannemoog committed Apr 29, 2018
1 parent 48adc7a commit a61bbcc
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 95 deletions.
2 changes: 1 addition & 1 deletion typo3/sysext/core/Classes/Database/Query/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ public function quoteIdentifiersForSelect(array $input): array
);
if (!empty($suffix)) {
throw new \InvalidArgumentException(
'QueryBuilder::quoteIdentifiersForSelect() could not parse the input "' . $input . '"',
'QueryBuilder::quoteIdentifiersForSelect() could not parse the select ' . $select . '.',
1461170686
);
}
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/core/Classes/Database/Query/QueryHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static function parseTableList(string $input): array

return array_map(
function ($expression) {
list($tableName, $as, $alias) = GeneralUtility::trimExplode(' ', $expression, true);
[$tableName, $as, $alias] = array_pad(GeneralUtility::trimExplode(' ', $expression, true), 3, null);

if (!empty($as) && strtolower($as) === 'as' && !empty($alias)) {
return [$tableName, $alias];
Expand Down
10 changes: 7 additions & 3 deletions typo3/sysext/core/Classes/Database/QueryGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -1209,14 +1209,18 @@ public function mkCompSelect($name, $comparison, $neg)
* @param array $arr
* @return array
*/
public function getSubscript($arr)
public function getSubscript($arr): array
{
$retArr = [];
while (is_array($arr)) {
while (\is_array($arr)) {
reset($arr);
$key = key($arr);
$retArr[] = $key;
$arr = $arr[$key];
if (isset($arr[$key])) {
$arr = $arr[$key];
} else {
break;
}
}
return $retArr;
}
Expand Down
Loading

0 comments on commit a61bbcc

Please sign in to comment.