Bug #68503
closed
check if array key exists before use them
Added by Martin Tepper over 9 years ago.
Updated about 6 years ago.
Description
Hello,
in my case i call TYPO3\CMS\Core\Database\ReferenceIndex::updateRefIndexTable() and this runs fetchTableRelationFields().
This method uses the TCA. But when the given table hasn't a TCA configuration a PHP warning will thrown.
- Status changed from New to Needs Feedback
- Assignee set to Mathias Schreiber
Why would you call that method for a table that has no rendering definition?
I use the extension update_refindex which has a scheduler task where you can choose tables.
There was a wrong configuration in my case and i got the warning. In generell i think that should not happen.
How do you spot the false configuration then?
Personally, I'd rather throw an exception making clear that the configuration is corrupt making usage of the extension impossible until the error has been resolved.
Sure, because of the warning :)
I agree.
Issue can be closed.
- Assignee changed from Mathias Schreiber to Stephan Großberndt
nono, no need to close it.
The core needs to throw the exception.
I'll assign this to Dr. RefIndex (currently on holiday)
- Status changed from Needs Feedback 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 http://review.typo3.org/42599
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42599
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42599
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42640
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF