Bug #69948

Warnings in DataHandler on undefined array indexes

Added by Oliver Hader about 4 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
DataHandler aka TCEmain
Target version:
Start date:
2015-09-18
Due date:
% Done:

100%

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

Description

Accessing array indexes that actually do not exist results in PHP warnings. This behavior is caught by using isset() or empty() but is not if using array_key_exists() on invalid array (e.g. NULL values).

Example warning:
PHP Warning: array_key_exists() expects parameter 2 to be array, null given in typo3/master/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 1640


Related issues

Related to TYPO3 Core - Bug #68606: copyRecords removes NULL values from original data Closed 2015-07-29

Associated revisions

Revision 522e4187 (diff)
Added by Oliver Hader about 4 years ago

[BUGFIX] Warnings in DataHandler on undefined array indexes

Accessing array indexes that actually do not exist, results
in a PHP warning. This behavior is caught by using isset()
or empty() on NULL values, but is not if using the function
array_key_exists(). Thus, an explicit check on NULL is added.

Resolves: #69948
Releases: master
Change-Id: I4fc9bb5ef9e8ff47ac199e0a7c02dd88ff6c1660
Reviewed-on: http://review.typo3.org/43423
Reviewed-by: Stephan GroƟberndt <>
Reviewed-by: Oliver Hader <>
Tested-by: Oliver Hader <>

History

#1 Updated by Oliver Hader about 4 years ago

Introduced in #68606

#2 Updated by Oliver Hader about 4 years ago

  • Description updated (diff)

Introduces in #68606

#3 Updated by Gerrit Code Review about 4 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 http://review.typo3.org/43423

#4 Updated by Oliver Hader about 4 years ago

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

#5 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF