Actions
Bug #72850
closedforeach error in DatabaseTreeDataProvider
Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-01-20
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
The foreach loop in /typo3_src-7.6.2/typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php raises a PHP error when no record has been found.
Add the check if not empty.
protected function listFieldQuery($fieldName, $queryId) { $records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', $this->getTableName(), $GLOBALS['TYPO3_DB']->listQuery($fieldName, (int)$queryId, $this->getTableName()) . ((int)$queryId === 0 ? ' OR CAST(' . $fieldName . ' AS CHAR) = \'\'' : '')); $uidArray = array(); if (!empty($records)) { foreach ($records as $record) { $uidArray[] = $record['uid']; } } return $uidArray; }
Updated by Gerrit Code Review almost 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46117
Updated by Wouter Wolters almost 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e2c0c144c419d50f10bef2d54f642e0102ca87bb.
Updated by Gerrit Code Review almost 9 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46209
Updated by Wouter Wolters almost 9 years ago
- Status changed from Under Review to Resolved
Applied in changeset 494f6b727a9e9d3a43d4027dabdbc8f2133ce131.
Actions