Project

General

Profile

Actions

Bug #68503

closed

check if array key exists before use them

Added by Martin Tepper over 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2015-07-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.

Actions #1

Updated by Mathias Schreiber over 8 years ago

  • 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?

Actions #2

Updated by Martin Tepper over 8 years ago

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.

Actions #3

Updated by Mathias Schreiber over 8 years ago

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.

Actions #4

Updated by Martin Tepper over 8 years ago

Sure, because of the warning :)

I agree.

Issue can be closed.

Actions #5

Updated by Mathias Schreiber over 8 years ago

  • 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)

Actions #6

Updated by Gerrit Code Review over 8 years ago

  • 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

Actions #7

Updated by Gerrit Code Review over 8 years ago

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

Actions #8

Updated by Gerrit Code Review over 8 years ago

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

Actions #9

Updated by Gerrit Code Review over 8 years ago

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

Actions #10

Updated by Stephan Großberndt over 8 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF