Bug #32467

tcemain: iterate over columns only if they are set

Added by Christian Weiske over 10 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2011-12-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

When unit-testing own extensions that use typo3 backend functionality, I get E_WARNINGs about typo3 iterating over an undefined "columns" variable.

The attached patch checks if the table's "columns" value is set, thus preventing the warning.

Invalid argument supplied for foreach()

/home/cweiske/foo/t3lib/class.t3lib_tcemain.php:5346
/home/cweiske/foo/t3lib/class.t3lib_tcemain.php:222

(table is tx_rsaauth_keys)


Files

typo3-tcemain-columns.diff (857 Bytes) typo3-tcemain-columns.diff Christian Weiske, 2011-12-12 10:54
#1

Updated by Oliver Hader over 10 years ago

  • Status changed from New to Needs Feedback
  • PHP Version set to 5.3
  • Complexity set to easy

You can change that directly by your contribution. Get more information here: http://typo3.org/development/bug-fixing/resolving-bugs/

Besides that, can you please tell me why your table does not have columns? Is that intended or is it a regular table like 'tt_content' (the we might consider it as an additional bug). Thanks for your feedback...

#2

Updated by Christian Weiske over 10 years ago

The table "tx_rsaauth_keys" is part of a standard TYPO3 installation - it's not a custom one.

#3

Updated by Gerrit Code Review over 10 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9061

#4

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9061

#5

Updated by Mario Rimann over 10 years ago

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

Updated by Gerrit Code Review over 10 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/9075

#7

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/9076

#8

Updated by Mario Rimann over 10 years ago

  • Status changed from Under Review to Resolved
#9

Updated by Benni Mack almost 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF